mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
388 lines
20 KiB
PHP
Executable File
388 lines
20 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">{{ __('procedures.add_procedure') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('procedures.dashboard') }}</a></li>
|
|
<li><a href="/procedures/index">{{ __('procedures.procedures') }}</a></li>
|
|
<li class="active">{{ __('procedures.create') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
@include('clinical_data::procedures.menu')
|
|
</div>
|
|
</div>
|
|
@php
|
|
$section_number = '3';
|
|
$inpatient =array_filter($hmis_categories, function ($item) use ($section_number) {
|
|
return $item['section_number'] == $section_number;
|
|
});
|
|
$type = '0';
|
|
$outpatient =array_filter($hmis_categories, function ($item) use ($type) {
|
|
return $item['type'] == $type;
|
|
});
|
|
@endphp
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<!--Flash messages at the top -->
|
|
@include('flash::message')
|
|
<div class="white-box">
|
|
@if (session()->has('streamline_setup'))
|
|
<h3><font color="blue">Stre@mline {{ __('procedures.setup') }} ({{ __('procedures.step') }} 9 {{ __('procedures.of') }} 12)</font></h3>
|
|
{{ Form::open(['route' => 'procedures.store']) }}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('procedures.procedure_name')) }}
|
|
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('non_insured_price', __('procedures.non_insured_price')) }}
|
|
{{ Form::number('non_insured_price', '', ['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('category', __('procedures.category')) }}
|
|
{{ Form::select('category', $procedure_categories, null, ['class' => 'form-control']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('available', __('procedures.is_diagnosis_available'), ["class"=>'col-md-12']) }}
|
|
{{ __('procedures.yes') }} {{ Form::radio('available', 1, false, [ 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('procedures.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">
|
|
{{ Form::label('hmis_number', 'HMIS No.') }}
|
|
{{ Form::number('hmis_number', '', ['class'=>'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('account_id',__('procedures.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-sm-2"></div>
|
|
<div class="col-sm-4" style="background: #eceeef;">
|
|
<h4>{{ __('procedures.select_any_from_list') }}</h4>
|
|
<input id="select_all" type="checkbox"> <b>Select All</b><br><br>
|
|
@foreach ($procedures as $defaultProcedure)
|
|
<div class="form-group">
|
|
{{ Form::checkbox('selected_procedures[]', $defaultProcedure['Procedure_Name'], false, ['class' => 'item_checkbox']) }} {{ $defaultProcedure['Procedure_Name'] }}
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
{{ Form::button(__('procedures.next'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 next']) }}
|
|
{{ Form::button(__('procedures.skip'),['type'=>'submit','name' => 'skip','value'=>'Skip','class'=>'btn btn-default waves-effect waves-light m-r-10']) }}
|
|
@else
|
|
|
|
{{ Form::open(['route' => 'procedures.store', 'data-toggle' => 'validator']) }}
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('procedures.procedure_name')) }}
|
|
{{ Form::text('name', '', ['class' => 'form-control compulsory']) }}
|
|
<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('non_insured_price', __('procedures.non_insured_price')) }}
|
|
{{ Form::number('non_insured_price', '', ['class' => 'form-control compulsory', 'id' => 'non_insured_price']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</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('category', __('procedures.category')) }}
|
|
{{ Form::select('category', $procedure_categories, null, ['class' => 'form-control compulsory', 'id' =>'category']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('available', __('procedures.is_procedure_available'), ["class"=>'col-md-12']) }}
|
|
{{ __('procedures.yes') }} {{ Form::radio('available', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('procedures.no') }} {{ Form::radio('available', 0, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('reference_text', __('symptoms.reference_area')) }}
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
{{ Form::text('reference_text[]', '', ['class'=>'form-control', 'placeholder' => 'reference name']) }}
|
|
</div>
|
|
<div class="col-sm-8">
|
|
{{ Form::url('reference_link[]', '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
|
|
</div>
|
|
<div class="col-sm-12 refrence_input_fields_wrap"></div>
|
|
<div class="col-sm-12"><a class="add_field_button" style="color: blue;">{{ __('symptoms.add_more') }}</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('hmis_number', 'HMIS No.') }}
|
|
{{ Form::number('hmis_number', '', ['class'=>'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('account_id',__('procedures.chart_of_account_name')) }}
|
|
{{ Form::select('account_id',$chart_of_accounts,'',['class' => 'form-control compulsory', 'id' =>'account_id', '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', 'HMIS category (Out Patient)') }}
|
|
<select class="form-control" id="hmis_category_outpatient" name="hmis_category_outpatient">
|
|
<option value="" selected disabled>- Select HMIS Out Patient Category -</option>
|
|
@foreach ($outpatient as $outpatient_item)
|
|
<option value="{{ $outpatient_item['id'] }}">{{ $outpatient_item['title'] }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- {{ Form::label('hmis_no_outpatient', 'HMIS-out-patient No.') }}
|
|
{{ Form::text('hmis_no_outpatient', '', ['class'=>'form-control']) }} -->
|
|
</div>
|
|
<a class="add_field_hmis" style="color: blue;">{{ __('procedures.add_more') }}</a><br><br>
|
|
<hr>
|
|
<p> HMIS Inpatient Report (108) </p>
|
|
<div class="form-group">
|
|
<select class="form-control required compulsory" id="procedure_type" name="procedure_type">
|
|
<option value="" selected disabled>Select Procedure type</option>
|
|
<option value="0">Non-Surgical</option>
|
|
<option value="1">Surgical</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="row" id="input_fields_wrap2">
|
|
{{-- <div class="form-group col-sm-6">
|
|
{{ Form::label('hmis_no_inpatient', 'HMIS-in-patient No.') }}
|
|
{{ Form::text('hmis_no_inpatient', '', ['class'=>'form-control']) }}
|
|
</div> --}}
|
|
<div class="form-group col-sm-4">
|
|
{{ Form::label('hmis_category_inpatient', __('diagnoses.hmis_inpatient_category')) }}
|
|
<select class="form-control" id="hmis_category_inpatient" name="hmis_category_inpatient">
|
|
<option value="" selected disabled>- Select HMIS category -</option>
|
|
@foreach ($inpatient as $inpatient_item)
|
|
<option value="{{ $inpatient_item['id'] }}">{{ $inpatient_item['title'] }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-sm-4">
|
|
{{ Form::label('hmis_category_inpatient_options', __('diagnoses.hmis_inpatient_category')) }}
|
|
<select class="form-control" id="hmis_category_inpatient_options" name="hmis_category_inpatient_options">
|
|
<option value="" selected disabled>- Select HMIS category first -</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-sm-4" id="hysterectomy_type">
|
|
{{ Form::label('hysterectomy_type', 'Hysterectomy type') }}
|
|
<select class="form-control" id="hysterectomy_type_option" name="hysterectomy_type">
|
|
<option value="" selected disabled>- Select Hysterectomy type -</option>
|
|
<option value="SP05a">Total Hysterectomy</option>
|
|
<option value="SP05b">Sub-total Hysterectomy</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{{ Form::button(__('procedures.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 submit-btn']) }}
|
|
{{ Form::button(__('procedures.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
|
@endif
|
|
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<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">
|
|
$(".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("<?php echo __('procedures.compulsory_fields_warning') ?>");
|
|
console.log(empty_compulsory_fields);
|
|
e.preventDefault();
|
|
return false;
|
|
}
|
|
});
|
|
|
|
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) {
|
|
//alert('clicked here');
|
|
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();
|
|
$(this).parent('div').remove();
|
|
x1--;
|
|
});
|
|
|
|
$('#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);
|
|
});
|
|
}
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
var max_fields = 4; //maximum input boxes allowed
|
|
var wrapper = $(".refrence_input_fields_wrap"); //Fields wrapper
|
|
|
|
var x = 1; //initlal text box count
|
|
$(".add_field_button").click(function (e) { //on add input button click
|
|
e.preventDefault();
|
|
if (x < max_fields) { //max input box allowed
|
|
x++; //text box increment
|
|
$(wrapper).append('<br><div class="row"><div class="col-sm-4"><input type="text" class="form-control compulsory" placeholder="Reference name" name="reference_text[]" required/></div>' +
|
|
'<div class="col-sm-7"><input type="url" placeholder="eg http://www.google.com" class="form-control compulsory" name="reference_link[]" required/></div>'
|
|
+ '<a href="#" class="remove_field" style="color: maroon"><sup>X</sup></a></div>'); //add input box
|
|
}else {
|
|
$(".add_field_button").hide();
|
|
alert('Only four references can be added.');
|
|
}
|
|
});
|
|
|
|
$(wrapper).on("click", ".remove_field", function (e) { //user click on remove text
|
|
e.preventDefault();
|
|
$(this).parent('div').remove();
|
|
x--;
|
|
})
|
|
});
|
|
|
|
$('#input_fields_wrap2').hide();
|
|
$('#hysterectomy_type').hide();
|
|
$('#account_id, #category, #hmis_category_outpatient').select2();
|
|
$('#category, #account_id, #procedure_type').prop('required',true);
|
|
$('#procedure_type').change(function(e) {
|
|
if(this.value == '1') {
|
|
$('#input_fields_wrap2').show();
|
|
$('#hmis_category_inpatient').select2();
|
|
$('#hmis_category_inpatient_options').select2();
|
|
$('#hmis_category_inpatient').prop('required',true);
|
|
}
|
|
else {
|
|
let option = '<option value="" selected disabled>- Select HMIS category first -</option>';
|
|
$('#input_fields_wrap2, #hysterectomy_type').hide();
|
|
$('#hmis_category_inpatient_options').html(option);
|
|
$('#hmis_category_inpatient, #hysterectomy_type_option').prop('selectedIndex',0);
|
|
$('#hmis_category_inpatient, #hysterectomy_type_option').prop('required',false);
|
|
}
|
|
});
|
|
|
|
$('#hmis_category_inpatient').change(function(e) {
|
|
category_options();
|
|
});
|
|
|
|
function category_options(){
|
|
let category = $('#hmis_category_inpatient').val(); console.log(category);
|
|
$.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 {
|
|
$('#hmis_category_inpatient_options').html(response);
|
|
if(category != '46') $('#hysterectomy_type').hide();
|
|
$('#hmis_category_inpatient_options').prop('required',true);
|
|
$('#hysterectomy_type_option').prop('selectedIndex',0);
|
|
$('#hysterectomy_type_option').prop('required',false);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#hmis_category_inpatient_options').change(function(e) {
|
|
if(this.value == '5') {
|
|
$('#hysterectomy_type').show();
|
|
$('#hysterectomy_type_option').prop('required',true);
|
|
}
|
|
else {
|
|
$('#hysterectomy_type').hide();
|
|
$('#hysterectomy_type_option').prop('required',false);
|
|
$('#hysterectomy_type_option').prop('selectedIndex',0);
|
|
}
|
|
});
|
|
</script>
|
|
@endpush
|