mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
449 lines
24 KiB
PHP
Executable File
449 lines
24 KiB
PHP
Executable File
@extends('layouts.main')
|
|
|
|
@push('styles')
|
|
<link href="{{ asset('elite/bower_components/icheck/skins/all.css') }}" rel="stylesheet">
|
|
<link href="{{ asset('elite/bower_components/select2/select2.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">{{ __('investigations.add_investigation') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('investigations.dashboard') }}</a></li>
|
|
<li><a href="{{ route('investigations.index') }}">{{ __('investigations.investigations') }}</a></li>
|
|
<li class="active">{{ __('investigations.create') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
@include('investigations::investigations.menu')
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<!--Flash messages at the top -->
|
|
@include('flash::message')
|
|
@if ($errors->any())
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
<div class="white-box">
|
|
@if (session()->has('streamline_setup'))
|
|
<h3><font color="blue">Stre@mline {{ __('investigations.setup') }} ({{ __('investigations.step') }} 7 {{ __('investigations.of') }} 12)</font></h3>
|
|
|
|
{{ Form::open(['route' => 'investigations.store', 'data-toggle' => 'validator']) }}
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('investigations.investigation_name')) }}
|
|
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('category', __('investigations.category')) }}
|
|
{{ Form::select('category',$investigation_categories,'',['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('units', __('investigations.unit')) }}
|
|
{{ Form::select('units',$unit_of_measure,'',['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('minimum', __('investigations.minimum')) }}
|
|
{{ Form::text('minimum', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('sample_container', __('investigations.sample_container')) }}
|
|
{{ Form::text('sample_container', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('comments', __('investigations.comments')) }}
|
|
{{ Form::textArea('comments', '', ['class'=>'form-control', 'rows' => 9]) }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{{ Form::label('non_insured_price', __('investigations.non_insured_price')) }}
|
|
{{ Form::number('non_insured_price', '', ['class' => 'form-control', 'id' => 'non_insured_price']) }}
|
|
</div>
|
|
|
|
@php
|
|
$price_list_categories = \Streamline\Models\PriceListCategories::select('patient_category_id', 'id')->get();
|
|
@endphp
|
|
|
|
@foreach($price_list_categories as $record)
|
|
<div class="form-group">
|
|
{{ Form::label('non_insured_price', get_name($record->patient_category_id, 'id', 'name', 'patient_categories').' Price') }}
|
|
{{ Form::hidden('price_list_category_id[]', $record->id) }}
|
|
{{ Form::number('price_list_price[]', '', ['class'=>'form-control price_list_price']) }}
|
|
</div>
|
|
@endforeach
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('normal_ranges', __('investigations.normal_ranges')) }}
|
|
{{ Form::text('normal_ranges', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('lab_time', __('investigations.lab_time')) }}
|
|
{{ Form::text('lab_time', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('available',__('investigations.is_investigation_available'), ["class"=>'col-md-12']) }}
|
|
{{ __('investigations.yes') }} {{ Form::radio('available', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('investigations.no') }} {{ Form::radio('available', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group" id="echo_div">
|
|
{{ Form::label('echo',__('investigations.echo_investigation_template'), ["class"=>'col-md-12']) }}
|
|
{{ __('investigations.yes') }} {{ Form::radio('echo', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('investigations.no') }} {{ Form::radio('echo', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group">
|
|
{{ Form::label('account_id',__('investigations.chart_of_account_name')) }}
|
|
{{ Form::select('account_id',$chart_of_accounts,'',['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4" style="background: #eceeef;">
|
|
<h4>{{ __('investigations.select_from_list') }}</h4>
|
|
@foreach ($investigations as $investigation)
|
|
<div class="form-group">
|
|
{{ Form::checkbox('selected_investigations[]', $investigation['name'], false) }} {{ $investigation['name'] }}
|
|
{{ Form::hidden('selected_category[]', $investigation['category']) }}
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
{{ Form::button(__('investigations.next'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 next']) }}
|
|
{{ Form::button(__('investigations.skip'),['type'=>'submit','name' => 'skip', 'value' => 'skip','class'=>'btn btn-default waves-effect waves-light m-r-10']) }}
|
|
@else
|
|
|
|
{{-- {{ Form::open(['route' => 'investigations.store', 'data-toggle' => 'validator']) }} --}}
|
|
{{ Form::open(['route' => 'investigations.store']) }}
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('investigations.investigation_name')) }}
|
|
{{ Form::text('name', '', ['class' => 'form-control compulsory','required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('category', __('investigations.category')) }}
|
|
{{ Form::select('category',$investigation_categories,'',['class' => 'form-control compulsory','required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('units', __('investigations.unit')) }}
|
|
{{ Form::select('units',$unit_of_measure,'',['class' => 'form-control compulsory','required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('minimum', __('investigations.minimum')) }}
|
|
{{ Form::text('minimum', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('sample_container', __('investigations.sample_container')) }}
|
|
{{ Form::text('sample_container', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('range_type', 'Is the Reference Range ?') }}
|
|
{{ Form::select('range_type', ['' => '--select--',1 => 'Dynamic', 2 => 'Constant'], '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group" style="display: none;" id="constant_div">
|
|
{{ Form::label('normal_ranges', __('investigations.normal_ranges')) }}
|
|
{{ Form::text('normal_ranges', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div style="display: none;" id="dynamic_div">
|
|
@php $age_groups = \Streamline\Models\AgeGroup::get(); @endphp
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h5>Male</h5>
|
|
<br>
|
|
@foreach($age_groups as $age)
|
|
{{ Form::label('dynamic_range', $age->name) }}
|
|
{{ Form::text('dynamic_range_male[]', '', ['class' => 'form-control']) }}
|
|
{{ Form::hidden('age_id[]', $age->id) }}
|
|
<br>
|
|
@endforeach
|
|
</div>
|
|
<div class="col-md-6">
|
|
<h5>Female</h5>
|
|
<br>
|
|
@foreach($age_groups as $age)
|
|
{{ Form::label('dynamic_range', $age->name) }}
|
|
{{ Form::text('dynamic_range_female[]', '', ['class' => 'form-control']) }}
|
|
<br>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('lab_time', __('investigations.lab_time')) }}
|
|
{{ Form::text('lab_time', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('available',__('investigations.is_investigation_available'), ["class"=>'col-md-12','required']) }}
|
|
{{ __('investigations.yes') }} {{ Form::radio('available', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green','required' => 'required']) }}
|
|
{{ __('investigations.no') }} {{ Form::radio('available', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green','required' => 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group" id="echo_div">
|
|
{{ Form::label('echo',__('investigations.echo_investigation_template'), ["class"=>'col-md-12']) }}
|
|
{{ __('investigations.yes') }} {{ Form::radio('echo', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('investigations.no') }} {{ Form::radio('echo', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('is_chronic',__('investigations.is_investigation_chronic'), ["class"=>'col-md-12']) }}
|
|
{{ __('investigations.yes') }} {{ Form::radio('is_chronic', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green','required' => 'required']) }}
|
|
{{ __('investigations.no') }} {{ Form::radio('is_chronic', 0, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green','required' => 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('code', 'Item Code') }}
|
|
{{ Form::text('code', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('reference_areas', __('diagnoses.reference_areas')) }}
|
|
{{ Form::text('reference_text', '', ['class' => 'form-control', 'placeholder' => 'Reference text']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group">
|
|
{{ Form::text('reference_link', '', ['class' => 'form-control', 'placeholder' => 'Reference link e.g. http://google.com']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('non_insured_price', __('investigations.non_insured_price')) }}
|
|
{{ Form::number('non_insured_price', '', ['class' => 'form-control compulsory','required', 'id' => 'non_insured_price']) }}
|
|
</div>
|
|
|
|
@php
|
|
$price_list_categories = \Streamline\Models\PriceListCategories::select('patient_category_id', 'id')->get();
|
|
@endphp
|
|
|
|
@foreach($price_list_categories as $record)
|
|
<div class="form-group">
|
|
{{ Form::label('non_insured_price', get_name($record->patient_category_id, 'id', 'name', 'patient_categories').' Price') }}
|
|
{{ Form::hidden('price_list_category_id[]', $record->id) }}
|
|
{{ Form::number('price_list_price[]', '', ['class'=>'form-control price_list_price']) }}
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{{ Form::label('comments', __('investigations.comments')) }}
|
|
{{ Form::textArea('comments', '', ['class'=>'form-control', 'rows' => 9]) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('account_id',__('investigations.chart_of_account_name')) }}
|
|
{{ Form::select('account_id',$chart_of_accounts,'',['class' => 'form-control compulsory','required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group" id="wrapper">
|
|
<div class="row input_fields_wrap1 copy1">
|
|
<div class="col-sm-5">
|
|
{{ Form::label('hmis_no_outpatient', 'HMIS-out-patient No.') }}
|
|
{{ Form::text('hmis_no_outpatient[]', '', ['class'=>'form-control']) }}
|
|
</div>
|
|
<div class="col-sm-6">
|
|
{{ Form::label('hmis_category', __('investigations.hmis_category_out_patient')) }}
|
|
{{ Form::select('hmis_category[]', $hmis_categories, '', ['class' => 'form-control']) }}
|
|
</div>
|
|
</div>
|
|
<!-- {{ Form::label('hmis_no_outpatient', __('investigations.hmis_category_out_patient_number')) }}
|
|
{{ Form::text('hmis_no_outpatient', '', ['class'=>'form-control']) }} -->
|
|
</div>
|
|
<a class="add_field_hmis" style="color: blue;">{{ __('investigations.add_more') }}</a><br><br>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('hmis_category_inpatient', __('investigations.hmis_category_in_patient')) }}
|
|
<select class="form-control" id="hmis_category_inpatient" name="hmis_category_inpatient">
|
|
<option value="" selected disabled>- Select HMIS category -</option>
|
|
@foreach ($inpatient_hmis_categories as $inpatient_item)
|
|
<option value="{{ $inpatient_item['id'] }}">{{ $inpatient_item['title'] }}</option>
|
|
@endforeach
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
|
|
{{ Form::label('hmis_no_inpatient', __('investigations.hmis_category_in_patient_number')) }}
|
|
<select class="form-control" id="inpatient_hmis_category_options" name="hmis_no_inpatient">
|
|
<option value="" selected disabled>- Select HMIS category first -</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group">
|
|
{{ Form::label('hmis_002_slug', __('investigations.hmis_002_category')) }}
|
|
{{ Form::select('hmis_002_slug', ['' => '--select--',1 => 'TB', 2 => 'RDT', 3=>'B/S', 4=>'RBS'], '', ['class' => 'form-control', 'id'=>'hmis_002_slug']) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ Form::button(__('investigations.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 submit-btn']) }}
|
|
{{ Form::button(__('investigations.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
|
@endif
|
|
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
|
|
|
<!-- icheck -->
|
|
<script src="{{ asset('elite/bower_components/icheck/icheck.min.js') }}"></script>
|
|
<script src="{{ asset('elite/bower_components/icheck/icheck.init.js') }}"></script>
|
|
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$(".next,.submit-btn").click(function (e) { // make sure that all compulsory fields have been filled out
|
|
var empty_compulsory_fields = [];
|
|
$(".compulsory").each(function () {
|
|
if ($(this).val() == "") {
|
|
// var textname = $(this).attr('name');
|
|
$(this).focus();
|
|
empty_compulsory_fields.push(textname);
|
|
$(this).css('border','1px solid #F08080');
|
|
}
|
|
});
|
|
/* check if the array containing empty compulsory fields is not empty then return false */
|
|
if (empty_compulsory_fields.length != 0) {
|
|
alert("Please fill in all compulsory fields");
|
|
console.log(empty_compulsory_fields);
|
|
e.preventDefault();
|
|
return false;
|
|
}
|
|
});
|
|
$('#echo_div').hide();
|
|
var max_fields1 = 4; //maximum reference area/name divs allowed
|
|
var x1 = 1; //initial reference area/name div count
|
|
|
|
$(".add_field_hmis").on("click", function (e) {
|
|
e.preventDefault();
|
|
if (x1 < max_fields1) {
|
|
x1++;
|
|
var copy1 = $('.copy1').clone();
|
|
copy1.attr("class", 'row input_fields_wrap1');
|
|
copy1.attr("id", 'copy1' + x1);
|
|
copy1.append('<a href="#" class="remove_field1" style="color: maroon"><sup>X</sup></a>');
|
|
copy1.insertAfter('.copy1');
|
|
}
|
|
});
|
|
|
|
$("#wrapper").on("click", ".remove_field1", function (e) {
|
|
e.preventDefault();
|
|
console.log("about to remove div");
|
|
$(this).parent('div').remove();
|
|
x1--;
|
|
});
|
|
|
|
$('#range_type').change(function (e) {
|
|
e.preventDefault();
|
|
if(this.value == 2){
|
|
$('#constant_div').show();
|
|
$('#dynamic_div').hide();
|
|
}else{
|
|
$('#constant_div').hide();
|
|
$('#dynamic_div').show();
|
|
}
|
|
});
|
|
|
|
$('#select_all').change(function() {
|
|
if (this.checked === true) {
|
|
$(".item_checkbox").each(function() {
|
|
this.checked = true;
|
|
});
|
|
} else {
|
|
$(".item_checkbox").each(function() {
|
|
this.checked = false;
|
|
});
|
|
}
|
|
});
|
|
|
|
$('#non_insured_price').change(function(e) {
|
|
var non_insured_price = $(this).val();
|
|
if (non_insured_price > 0) {
|
|
$(".price_list_price").each(function () {
|
|
$(this).val(non_insured_price);
|
|
});
|
|
}
|
|
});
|
|
|
|
$('#category').change(function() {
|
|
if($(this).val() == '17') $('#echo_div').show();
|
|
else {
|
|
$('#echo_div').hide();
|
|
$('#echo').val(0);
|
|
}
|
|
});
|
|
});
|
|
|
|
$('#hmis_category_inpatient,#inpatient_hmis_category_options').select2();
|
|
$('#hmis_category_inpatient,#inpatient_hmis_category_options').prop('required',false);
|
|
$('#hmis_category_inpatient').change(function(e) {
|
|
category_options();
|
|
});
|
|
|
|
function category_options(){
|
|
let category = $('#hmis_category_inpatient').val();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/get_hmis_categories_options",
|
|
data: {hmis_category: category},
|
|
cache: false,
|
|
success: function (response) {
|
|
if(response == 'false'){
|
|
alert("<?php echo __('procedures.failed_options'); ?>");
|
|
} else {
|
|
$('#inpatient_hmis_category_options').html(response);
|
|
$('#inpatient_hmis_category_options').prop('required',false);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#account_id, #category, #units').select2();
|
|
|
|
</script>
|
|
@endpush
|