mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
212 lines
8.9 KiB
PHP
Executable File
212 lines
8.9 KiB
PHP
Executable File
@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/select2/select2.min.css') }}" rel="stylesheet"/>
|
|
@endpush
|
|
|
|
@section('content')
|
|
<div class="row bg-title">
|
|
<div class="col-lg-4 col-md-5 col-sm-5 col-xs-12">
|
|
<h4 class="page-title">{{ __('layout.alter_investigations_results') }}</h4>
|
|
</div>
|
|
<div class="col-lg-8 col-sm-7 col-md-7 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('investigations.dashboard') }}</a></li>
|
|
<li><a href="/investigations/index">{{ __('investigations.investigations') }}</a></li>
|
|
<li class="active">{{ __('investigations.alter') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="white-box">
|
|
{{ Form::open(['method'=>'post','route' => 'investigations.alter_results']) }}
|
|
|
|
{{ Form::hidden('patient_id', 0, ['id' => 'patient_id']) }}
|
|
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
<label>{{ __('pharmacy.select_date') }}:</label>
|
|
<select class="form-control compulsory required" name="search_date_by" id="search_date_by" required>
|
|
<option value="today">{{ __('pharmacy.today') }}</option>
|
|
<option value="yesterday">{{ __('pharmacy.yesterday') }}</option>
|
|
<option value="custom_date">{{ __('pharmacy.custom_date') }}</option>
|
|
<option value="custom_date_range">{{ __('pharmacy.date_range') }}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2" id="start_date_div" style="display: none;">
|
|
<div class="form-group">
|
|
{{ Form::label('start_date', __('pharmacy.date_on')) }}
|
|
<div class="input-group">
|
|
{{ Form::text('start_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'start_date']) }}
|
|
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2" id="end_date_div" style="display: none;">
|
|
<div class="form-group">
|
|
{{ Form::label('end_date', __('pharmacy.end_date')) }}
|
|
<div class="input-group">
|
|
{{ Form::text('end_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'end_date']) }}
|
|
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
{{ Form::label('search_patient', 'Search By Patient') }}
|
|
<div class="input-group">
|
|
<select class="form-control" name="patient_number" id="patient_number"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<div class="form-group" style="margin-top: 25px;">
|
|
{{ Form::submit(__('investigations.search'), ['class'=>'btn btn-success pull-right']) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ Form::close() }}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="white-box">
|
|
@include('flash::message')
|
|
|
|
@if($search_text != "")
|
|
<h4><label class="label label-info">{{ $search_text }}</label></h4>
|
|
<br>
|
|
@endif
|
|
<div class="table-responsive">
|
|
<table class="table table-striped color-bordered-table success-bordered-table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('investigations.patient_number') }}</th>
|
|
<th>{{ __('investigations.patient_names') }}</th>
|
|
<th>{{ __('investigations.ordered_investigations') }}</th>
|
|
<th>{{ __('investigations.gender') }}</th>
|
|
<th>{{ __('investigations.date_of_birth') }}</th>
|
|
<th>{{ __('investigations.submission_date') }}</th>
|
|
<th>{{ __('investigations.actions') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($results as $result)
|
|
<tr>
|
|
<td>
|
|
{{ get_name($result->patient_id, 'id', 'number', 'patients') }}
|
|
</td>
|
|
<td>
|
|
{!! insurance_flag($result->patient_id) !!}
|
|
</td>
|
|
<td>
|
|
<?php $investigation_ids = explode(",", $result->investigation_id) ?>
|
|
|
|
<ol>
|
|
@foreach($investigation_ids as $investigation_id)
|
|
<li>{{ get_name($investigation_id, 'id', 'name', 'investigations') }}</li>
|
|
@endforeach
|
|
</ol>
|
|
</td>
|
|
<td>
|
|
<?php $gender = get_name($result->patient_id, 'id', 'gender', 'patients') ?>
|
|
@if($gender == 1)
|
|
{{ __('investigations.male') }}
|
|
@elseif($gender == 2)
|
|
{{ __('investigations.female') }}
|
|
@elseif($gender == 3)
|
|
{{ __('investigations.other') }}
|
|
@endif
|
|
</td>
|
|
<td>
|
|
{{ streamline_date_plain(get_name($result->patient_id, 'id', 'date_of_birth', 'patients')) }}
|
|
</td>
|
|
<td>
|
|
{{ removeSeconds($result->created_at) }}
|
|
</td>
|
|
<td class="text-center">
|
|
{{ Form::open(['route' => 'investigations.alter_ordered_results']) }}
|
|
|
|
{{ Form::hidden('patient_id',$result->patient_id) }}
|
|
|
|
{{ Form::hidden('id',$result->id) }}
|
|
|
|
<button type="submit" class="btn btn-rounded btn-warning btn-sm">{{ __('investigations.alter') }}</button>
|
|
|
|
{{ Form::close() }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@if(count($results) <= 0)
|
|
<tr>
|
|
<td colspan="6" class='text-center' style='color: maroon; font-weight: bold;'>{{ __('investigations.no_investigations_found') }}</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<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 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
|
|
}
|
|
});
|
|
|
|
$('#search_date_by').change(function() {
|
|
if($(this).val() === "custom_date"){
|
|
$("#end_date_div").hide();
|
|
$("#start_date_div").show();
|
|
} else if($(this).val() === "custom_date_range") {
|
|
$("#start_date_div").show();
|
|
$("#end_date_div").show();
|
|
} else {
|
|
$("#end_date_div").hide();
|
|
$("#start_date_div").hide();
|
|
}
|
|
});
|
|
|
|
$('#end_date').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true,
|
|
format: 'dd-mm-yyyy'
|
|
});
|
|
|
|
$('#start_date').datepicker({
|
|
autoclose: true,
|
|
todayHighlight: true,
|
|
format: 'dd-mm-yyyy'
|
|
});
|
|
</script>
|
|
@endpush
|