mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 03:01:32 +00:00
resolved conflicts
This commit is contained in:
+724
@@ -0,0 +1,724 @@
|
||||
@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('js/gritter/css/jquery.gritter.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
|
||||
|
||||
<style type="text/css">
|
||||
.color-tr {
|
||||
background: #FFFF99;
|
||||
}
|
||||
|
||||
/* The container */
|
||||
.contained {
|
||||
display: block;
|
||||
position: relative;
|
||||
/*padding-left: 35px;*/
|
||||
/*margin-bottom: 12px;*/
|
||||
cursor: pointer;
|
||||
/*font-size: 22px;*/
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Hide the browser's default radio button */
|
||||
.contained input {
|
||||
/*position: absolute;*/
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Create a custom radio button */
|
||||
.checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
background-color: #eee;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* On mouse-over, add a grey background color */
|
||||
.contained:hover input~.checkmark {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* When the radio button is checked, add a blue background */
|
||||
.contained input:checked~.checkmark {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
/* Create the indicator (the dot/circle - hidden when not checked) */
|
||||
.checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Show the indicator (dot/circle) when checked */
|
||||
.contained input:checked~.checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Style the indicator (dot/circle) */
|
||||
.contained .checkmark:after {
|
||||
top: 9px;
|
||||
left: 9px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
}
|
||||
</style>
|
||||
@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">{{ __('wards.select_ward') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('wards.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('wards.index') }}">{{ __('wards.wards') }}</a></li>
|
||||
<li class="active">{{ __('wards.select') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include ('errors.list')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => 'wards.select', 'class' => 'typeahead', 'method' => 'ANY', 'role' => 'search']) }}
|
||||
|
||||
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
{{ Form::label('ward_id', __('wards.wards')) }}
|
||||
{{ Form::select('ward_id', $wards, '', ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group" id="searchby">
|
||||
{{ Form::label('search_by', __('wards.date')) }}
|
||||
{{ Form::select('search_by', ['' => '--select--', 0 => 'All Records', 1 => __('wards.today'), 2 => __('wards.yesterday'), 3 => __('wards.custom_date'), 4 => __('wards.custom_range')], '', ['class' => 'form-control','id'=>'search_by', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_search">
|
||||
<div class="form-group" id="reg_date" style="padding-top: 23px;">
|
||||
<div class="input-group">
|
||||
{{ Form::text('reg_date','',['class' => 'form-control compulsory',
|
||||
'required','readonly','id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="display: none;" id="date_range_search">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{{ Form::label('start_date', __('wards.from')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date','',['class' => 'form-control
|
||||
compulsory','readonly','id'=>'datepicker-autoclose-1']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="reg_date">
|
||||
{{ Form::label('end_date', __('wards.to')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date','',['class' => 'form-control
|
||||
compulsory','readonly','id'=>'datepicker-autoclose-2']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('search_patient', __('investigations.search_by_patient')) }}
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="patient_number" id="patient_number"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group" style="padding-top: 5px;"><br>
|
||||
{{ Form::button(__('wards.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect
|
||||
waves-light m-r-10', 'id'=>'select_patient']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<h3 style="color: #0060BF; font-weight: bolder;">{{ $search_text }}</h3>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::open(['route' => 'wards.route_patient_episode']) }}
|
||||
|
||||
<div class="white-box">
|
||||
<div class="table-responsive">
|
||||
<table class="table color-table success-table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">{{ __('wards.bed') }}</th>
|
||||
<th style="display: none">{{ __('wards.bed') }}</th>
|
||||
<th width="16%" style="padding-left: 1px; padding-right: 1px;">{{ __('wards.bed_category')
|
||||
}}</th>
|
||||
<th width="5%" style="padding-left: 0px; padding-right: 0px;">{{ __('wards.admission') }}
|
||||
</th>
|
||||
<th width="20%">{{ __('wards.names') }}</th>
|
||||
<th width="2%">{{ __('wards.sex') }}</th>
|
||||
<th width="2%">{{ __('wards.age') }}</th>
|
||||
<th width="10%">{{ __('wards.triage') }}</th>
|
||||
<th width="17%">{{ __('wards.primary_diagnosis') }}</th>
|
||||
<th width="22%">{{ __('wards.comments') }}</th>
|
||||
<th style="display: none">{{ __('wards.comments') }}</th>
|
||||
<th width="1%"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($inpatients as $inpatient)
|
||||
@if(\Streamline\Models\PatientEpisode::find($inpatient->episode_id))
|
||||
<tr id="my_row{{ $inpatient->episode_id }}">
|
||||
<td style="padding-left: 0px;">
|
||||
<!-- used for ordering this column -->
|
||||
<p style="display: none">{{ $inpatient->bed_no }}</p>
|
||||
|
||||
<input type="hidden" class="inpatient_id" value="{{ $inpatient->id }}">
|
||||
<input type="hidden" class="bed_patient_id" value="{{ $inpatient->patient_id }}">
|
||||
<input class="android-input" name="bed_no" value="{{ $inpatient->bed_no }}" id="bed_no"
|
||||
onchange="change_bed_number(this.value, <?php echo $inpatient->id ?>)"
|
||||
style="width: 100%; color: maroon; font-weight: bold; height: 60px; text-align: center;">
|
||||
<input type="hidden" class="bed_episode_id" value="{{ $inpatient->episode_id }}">
|
||||
</td>
|
||||
<td style="display: none">
|
||||
<!-- used for the print -->
|
||||
<p>{{ $inpatient->bed_no }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<!-- used for ordering this column -->
|
||||
<p style="display: none">{{ $inpatient->bed_category }}</p>
|
||||
|
||||
<select name="bed_category" class="android-input-select"
|
||||
onchange="update_bed_category(this.value, <?php echo $inpatient->id ?>)"
|
||||
style="width: 100%; height: 60px; color: maroon; text-align: center;">
|
||||
{!! custom_dropdown_selected("inpatient_bed_categories", "id", "name",
|
||||
$inpatient->bed_category_id) !!}
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding-left: 0px; padding-right: 0px;">
|
||||
<?php
|
||||
$admitted_on = new Carbon\Carbon($inpatient->admitted_on);
|
||||
echo streamline_date($inpatient->admitted_on) . '<br>';
|
||||
echo "<span style='font-size: smaller; color: #0a776c; font-weight: bold;'>" . $admitted_on->diffInDays(Carbon\Carbon::now()) . ' days</span>';
|
||||
?>
|
||||
</td>
|
||||
<td style="padding-left: 0px;">
|
||||
<?php
|
||||
echo insurance_flag($inpatient->patient_id) . '<br>';
|
||||
echo "<span style='font-size: smaller; color: #0a776c; font-weight: bold;'>" . $inpatient->number . '</span>';
|
||||
?>
|
||||
</td>
|
||||
<td>{{ $inpatient->gender == 1 ? __('wards.male') : __('wards.female') }}</td>
|
||||
<td>{{ get_patients_age($inpatient->date_of_birth) }}</td>
|
||||
<td>
|
||||
@php
|
||||
$severe_grade = !empty($inpatient->severe_grade)?
|
||||
severe_grade($inpatient->severe_grade):'N/A';
|
||||
echo $severe_grade;
|
||||
@endphp
|
||||
</td>
|
||||
<td style="padding-left: 0px; padding-right: 0px;">{{ $inpatient->primary_diagnosis_name ??
|
||||
'N/A' }}</td>
|
||||
<td>
|
||||
<!-- used for ordering this column -->
|
||||
<p style="display: none">{{ $inpatient->comments }}</p>
|
||||
|
||||
<input type="hidden" class="bed_patient_id" value="{{ $inpatient->patient_id }}">
|
||||
<!--<input value="" >-->
|
||||
<textarea class="change_comments android-input"
|
||||
style="color: maroon; width: 100%; padding: 0px; margin: 0px; height: 60px">{{ $inpatient->comments }}</textarea>
|
||||
<input type="hidden" class="bed_episode_id" value="{{ $inpatient->episode_id }}">
|
||||
</td>
|
||||
<td style="display: none">
|
||||
<!-- used for the print -->
|
||||
<p>{{ $inpatient->comments }}</p>
|
||||
</td>
|
||||
<td>
|
||||
@if($inpatient->slug == "maternity")
|
||||
<input type="radio" onchange="show('menu_maternity'), hide('inpatient_buttons_menu')"
|
||||
class="radio-option-inpatient center" name="episode_id" id="episode_id"
|
||||
value="{{ $inpatient->episode_id }}" />
|
||||
@else
|
||||
<input class="radio-option-inpatient"
|
||||
onchange="show('inpatient_buttons_menu'), hide('menu_maternity')" type="radio"
|
||||
name="episode_id" id="episode_id" value="{{ $inpatient->episode_id }}">
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- start the show menu buttons divs when a patient is selected -->
|
||||
<div id="inpatient_buttons_menu" style="display: none;">
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('perform-triage') && !is_add_attendance_to_consultation_enabled())
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm" value="triage">{{
|
||||
__('wards.triage') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('create-consultation'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm" value="consultation">{{
|
||||
__('wards.consultation') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-inpatient-sheet'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm"
|
||||
value="inpatient_sheet">{{ __('wards.inpatient_sheet') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-inpatient-billing'))
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-success btn-block btn-sm"
|
||||
value="inpatient_billing">{{ __('wards.inpatient_billing') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-2">
|
||||
<button type="submit" name="submit" class="btn btn-primary btn-block btn-sm"
|
||||
value="treatment_sheet">{{ __('patient_episode.treatment_sheet') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-box" id="menu_maternity" style="display: none;">
|
||||
{{--
|
||||
<div class="row">
|
||||
@if(Auth::user()->can('view-maternity-admission'))
|
||||
<div class="col-sm-3">
|
||||
<button name="submit" value="maternity_admission" class="btn btn-success pull-right col-sm-12">{{
|
||||
__('wards.maternity_admission') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-delivery-record'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="delivery_record" class="btn btn-success col-sm-12">{{
|
||||
__('wards.delivery_record') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if(Auth::user()->can('view-inpatient-billing'))
|
||||
<div class="col-sm-3">
|
||||
<button name="submit" value="maternity_summary" class="btn btn-success col-sm-12">{{
|
||||
__('wards.inpatient_sheet') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-2">
|
||||
@if(Auth::user()->can('create-theatre-surgery') || Auth::user()->can('create-theatre-anaesthesia'))
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown"
|
||||
class="btn btn-info dropdown-toggle waves-effect waves-light col-sm-12" type="button">{{
|
||||
__('patient_episode.theatre') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
<li><button type="submit" name="submit" value="create_anaesthetics"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.theatre_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="anaesthetics_history"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.historical_anaesthetics') }}</button></li>
|
||||
<li><button type="submit" name="submit" value="create_surgery"
|
||||
class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_surgery')
|
||||
}}</button></li>
|
||||
<li><button type="submit" name="submit" value="surgery_index"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.historical_surgeries') }}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
--}}
|
||||
|
||||
{{-- Maternity and delivery buttons --}}
|
||||
|
||||
{{-- maternity buttons row 1 --}}
|
||||
<div class="row">
|
||||
@if (Auth::user()->can('view-maternity-admission'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="maternity_admission" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.maternity_admission') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('view-delivery-record'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="delivery_record" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.delivery_record') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('view-inpatient-sheet'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="maternity_summary" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.inpatient_sheet') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('view-birth-report'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="birth_report" class="btn btn-sm btn-inverse btn-block">NIRA
|
||||
{{ __('patient_episode.birth_report') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-2">
|
||||
<div class="btn-group dropup m-r-10 col-sm-12">
|
||||
<button aria-expanded="false" data-toggle="dropdown"
|
||||
class="btn btn-sm btn-info dropdown-toggle waves-effect waves-light btn-block"
|
||||
type="button">{{ __('patient_episode.theatre') }} <span class="caret"></span></button>
|
||||
<ul role="menu" class="dropdown-menu">
|
||||
@if (Auth::user()->can('create-anaesthetics'))
|
||||
<li><button type="submit" name="submit" value="create_anaesthetics"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.theatre_anaesthetics') }}</button>
|
||||
</li>
|
||||
@endif
|
||||
@if (Auth::user()->can('view-anaesthetics-history'))
|
||||
<li><button type="submit" name="submit" value="anaesthetics_history"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.historical_anaesthetics') }}</button>
|
||||
</li>
|
||||
@endif
|
||||
@if (Auth::user()->can('create-surgery'))
|
||||
<li><button type="submit" name="submit" value="create_surgery"
|
||||
class="btn btn-default btn-sm btn-link">{{ __('patient_episode.theatre_surgery')
|
||||
}}</button>
|
||||
</li>
|
||||
@endif
|
||||
@if (Auth::user()->can('view-surgery'))
|
||||
<li><button type="submit" name="submit" value="surgery_index"
|
||||
class="btn btn-default btn-sm btn-link">{{
|
||||
__('patient_episode.historical_surgeries') }}</button>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- end of maternity buttons row 1 --}}
|
||||
|
||||
{{-- maternity buttons row 2 --}}
|
||||
<div class="row" style="margin-top:10px;">
|
||||
|
||||
@php
|
||||
$episode_id_id = session()->get('episode_id');
|
||||
$patient_episode_details = \Streamline\Models\PatientEpisode::find($episode_id_id);
|
||||
// $patient_id_id = $patient_episode_details->patient_id;
|
||||
|
||||
$check_if_labour_admission_exists = \Streamline\Models\LabourWardAdmission::where(
|
||||
'patient_id',
|
||||
$patient_id ?? '',
|
||||
)
|
||||
->where('episode_id', $episode_id_id)
|
||||
->first();
|
||||
@endphp
|
||||
|
||||
|
||||
@if (Auth::user()->can('labour-ward-admission'))
|
||||
{{-- <div class="col-sm-2">
|
||||
<button name="submit" value="labour_ward_admission" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.labour_ward_admission') }}</button> --}}
|
||||
<div class="col-sm-2">
|
||||
{{-- <button name="submit" value="labour_ward_admission"
|
||||
class="btn btn-success btn-sm btn-block">{{ __('patient_episode.labour_ward_admission') }}
|
||||
</button> --}}
|
||||
|
||||
{{-- @if (!empty($check_if_labour_admission_exists->complete))
|
||||
@if ($check_if_labour_admission_exists->complete == 0)
|
||||
<button name="submit" value="edit_labour_ward_admission_sheet"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
@endif
|
||||
@if ($check_if_labour_admission_exists->complete == 1)
|
||||
<button name="submit" value="labour_ward_admission_sheet_details"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
@endif
|
||||
@else
|
||||
<button name="submit" value="labour_ward_admission" class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
@endif --}}
|
||||
{{--
|
||||
@if ($check_if_labour_admission_exists->complete == 0)
|
||||
<button name="submit" value="edit_labour_ward_admission_sheet"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
|
||||
@elseif ($check_if_labour_admission_exists->complete == 1)
|
||||
<button name="submit" value="labour_ward_admission_sheet_details"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
|
||||
@else
|
||||
<button name="submit" value="labour_ward_admission" class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}</button>
|
||||
@endif --}}
|
||||
|
||||
@if ($check_if_labour_admission_exists !== null)
|
||||
@if ($check_if_labour_admission_exists->complete == 0)
|
||||
<button name="submit" value="edit_labour_ward_admission_sheet"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}
|
||||
</button>
|
||||
@elseif ($check_if_labour_admission_exists->complete == 1)
|
||||
<button name="submit" value="labour_ward_admission_sheet_details"
|
||||
class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}
|
||||
</button>
|
||||
@else
|
||||
<button name="submit" value="labour_ward_admission" class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}
|
||||
</button>
|
||||
@endif
|
||||
@else
|
||||
<!-- Handle the case where $check_if_labour_admission_exists is null -->
|
||||
<button name="submit" value="labour_ward_admission" class="btn btn-success btn-sm btn-block">
|
||||
{{ __('patient_episode.labour_ward_admission') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('safe-delivery'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="delivery_record" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.safe_delivery') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('partogram'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="maternity_summary" class="btn btn-success btn-sm btn-block">{{
|
||||
__('patient_episode.partogram') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
@if (Auth::user()->can('labour-ward-overview'))
|
||||
<div class="col-sm-2">
|
||||
<button name="submit" value="birth_report" class="btn btn-sm btn-inverse btn-block">{{
|
||||
__('patient_episode.labour_ward_overview') }}</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{{-- End maternity buttons row 2 --}}
|
||||
|
||||
|
||||
{{-- End of Maternity and delivery buttons --}}
|
||||
</div>
|
||||
<!-- end of buttons divs that show when a patient is selected -->
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<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 src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#search_by').change(function () {
|
||||
if ($(this).val() == 3) {
|
||||
$('#date_search').show();
|
||||
$('#date_range_search').hide();
|
||||
} else if ($(this).val() == 4) {
|
||||
$('#date_range_search').show();
|
||||
$('#date_search').hide();
|
||||
} else {
|
||||
$('#date_search,#date_range_search').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#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
|
||||
}
|
||||
});
|
||||
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
pageLength: 50,
|
||||
buttons: [
|
||||
{extend: 'print',
|
||||
exportOptions: {
|
||||
stripHtml: false,
|
||||
columns: [1, 3, 4, 5, 6, 7, 8, 10]
|
||||
},
|
||||
title: '{{ __('wards.ward_patient_list') }}'
|
||||
},
|
||||
{
|
||||
extend: 'pdf',
|
||||
exportOptions: {
|
||||
columns: [1, 3, 4, 5, 6, 7, 8, 10]
|
||||
},
|
||||
title: '{{ __('wards.ward_patient_list') }}'
|
||||
}
|
||||
]
|
||||
});
|
||||
$('.sorting').removeClass('sorting');//remove the sorting class
|
||||
$('.sorting_asc').removeClass('sorting_asc');//remove the sorting class
|
||||
|
||||
$('#datepicker-autoclose,#datepicker-autoclose-1,#datepicker-autoclose-2').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
$('.radio-option-inpatient').change(function(){
|
||||
//this is to highlight the clicked episode row
|
||||
let episode_id = $(this).val();
|
||||
if (this.checked) {
|
||||
// remove the class that highlights the selected row
|
||||
$('[id^=my_row]').css("background-color", "transparent");
|
||||
$('#my_row'+episode_id).css("background", "#FFFF99");
|
||||
}
|
||||
});
|
||||
|
||||
$('#datepicker-autoclose').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd/mm/yyyy'
|
||||
});
|
||||
|
||||
function change_bed_number(bed_no, inpatient_id) {
|
||||
var data = "bed_no=" + bed_no + "&inpatient_id=" + inpatient_id;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/submit_bed_number",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result === "success") {
|
||||
alert('<?php echo __('wards.bed_no_saved'); ?>');
|
||||
} else {
|
||||
alert("<?php echo __('wards.error_occurred'); ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//start update of ward comment
|
||||
$('.change_comments').each(function () {
|
||||
$(this).change(function () {
|
||||
var comment = $(this).val();
|
||||
var patient_id = $(this).prev(".bed_patient_id").val();
|
||||
var episode_id = $(this).next(".bed_episode_id").val();
|
||||
var data = "comment=" + comment + "&patient_id=" + patient_id + "&episode_id=" + episode_id;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/submit_ward_message",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result === "success") {
|
||||
alert('<?php echo __('wards.comments_saved'); ?>');
|
||||
} else {
|
||||
alert("<?php echo __('wards.error_occurred'); ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
//end update of ward comment
|
||||
|
||||
function update_bed_category(category_id, inpatient_id) {
|
||||
var data = "bed_category=" + category_id + "&inpatient_id=" + inpatient_id;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/submit_bed_category",
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result === "success") {
|
||||
alert("<?php echo __('wards.bed_category_saved'); ?>");
|
||||
} else {
|
||||
alert("<?php echo __('wards.error_occurred'); ?>");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function show(id) {
|
||||
if (document.getElementById(id).style.display === 'none') {
|
||||
document.getElementById(id).style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function hide(id) {
|
||||
document.getElementById(id).style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
Reference in New Issue
Block a user