mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
269 lines
14 KiB
PHP
Executable File
269 lines
14 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" />
|
|
<link href="{{ asset('elite/bower_components/icheck/skins/all.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">{{ __('diagnoses.add_diagnosis') }}</h4>
|
|
</div>
|
|
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">{{ __('diagnoses.dashboard') }}</a></li>
|
|
<li><a href="{{ route('diagnoses.index') }}">{{ __('diagnoses.diagnosis') }}</a></li>
|
|
<li class="active">{{ __('diagnoses.create') }}</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
@include('clinical_data::diagnoses.menu')
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<!--Flash messages at the top -->
|
|
@include('flash::message')
|
|
<div class="white-box">
|
|
{{ Form::open(['route' => 'diagnoses.store', 'data-toggle' => 'validator']) }}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{{ Form::label('name', __('diagnoses.diagnosis_name')) }}
|
|
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
@if (!empty($errors->get('name')))
|
|
<div class="help-block with-errors alert alert-danger">
|
|
@foreach ($errors->get('name') as $message)
|
|
{{ $message }}
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('icd10_code', __('diagnoses.icd_10_code')) }}
|
|
{{ Form::text('icd10_code', '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<p> HMIS Outpatient Report (105) </p>
|
|
<div class="form-group">
|
|
{{ Form::select('outpatient_hmis_category', $outpatient_hmis_categories, '', ['class' => 'form-control compulsory', 'id'=>'outpatient_hmis_category', 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group">
|
|
<select class="form-control" id="outpatient_hmis_category_option" name="outpatient_hmis_category_option" required>
|
|
<option value="" selected disabled>- Select HMIS Outpatient category first -</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group" id="outpatient_parent_dependent_option">
|
|
{{ Form::label('outpatient_dependent_option', 'Outpatient Dependent Option') }}
|
|
<select class="form-control" id="outpatient_dependent_option" name="outpatient_dependent_option">
|
|
<option value="" selected disabled>- Select Dependent Option -</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group" id="outpatient_district_code">
|
|
{{ Form::label('district_code', 'District Disease Code') }}
|
|
{{ Form::text('district_code', '', ['class' => 'form-control', 'id'=>'district_code']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<hr>
|
|
<p> HMIS Inpatient Report (108) </p>
|
|
<div class="form-group">
|
|
{{-- {{ Form::label('hmis_category', __('diagnoses.hmis_category')) }} --}}
|
|
{{ Form::select('hmis_category', $inpatient_hmis_categories, '', ['class' => 'form-control compulsory', 'id'=>'hmis_category_inpatient', 'required']) }}
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('hmis_category_inpatient_options', __('diagnoses.hmis_inpatient_category')) }}
|
|
<select class="form-control" id="hmis_category_inpatient_options" name="hmis_no_inpatient" required>
|
|
<option value="" selected disabled>- Select HMIS category first -</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
<div class="form-group" id="dependent_option">
|
|
{{ Form::label('hysterectomy_type', 'Dependent Option') }}
|
|
<select class="form-control" id="parent_dependent_option" name="parent_dependent_option">
|
|
<option value="" selected disabled>- Select Dependent Option -</option>
|
|
</select>
|
|
<div class="help-block with-errors"></div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
@if(is_chi_enabled())
|
|
<div class="form-group" id="drugs_dropdown">
|
|
{{ Form::label('insurance_tariffs', 'Insurance Tariffs') }}
|
|
{{ Form::select('insurance_tariffs[]', $insurance_tariffs,'',['id'=>'insurance_tariffs', 'multiple', 'class' => 'form-control']) }}
|
|
</div>
|
|
@endif
|
|
<div class="form-group">
|
|
{{ Form::label('prompts', __('diagnoses.diagnosis_prompt')) }}
|
|
{{ Form::textArea('prompts', '', ['class'=>'form-control', 'rows' => 5]) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('', __('diagnoses.chronic_status'), ["class"=>'col-md-12']) }}
|
|
{{ __('diagnoses.yes') }} {{ Form::radio('chronic_status', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('diagnoses.no') }} {{ Form::radio('chronic_status', 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('available', __('diagnoses.is_diagnosis_available'), ["class"=>'col-md-12']) }}
|
|
{{ __('diagnoses.yes') }} {{ Form::radio('available', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
|
{{ __('diagnoses.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('diagnosis_category', __('diagnoses.diagnosis_category')) }}
|
|
{{ Form::select('diagnosis_category', $diagnosis_categories, '', ['class' => 'form-control']) }}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('reference_areas', __('diagnoses.reference_areas')) }}
|
|
<div class="row input_fields_wrap copy" id="copy">
|
|
<br><br>
|
|
<div class="col-md-5">
|
|
{{ Form::text('reference_names[]', '', ['class' => 'form-control', 'placeholder' => 'Reference name']) }}
|
|
</div>
|
|
<div class="col-md-6">
|
|
{{ Form::text('reference_areas[]', '', ['class' => 'form-control', 'placeholder' => 'e.g. http://google.com']) }}
|
|
</div>
|
|
<br><br>
|
|
</div>
|
|
</div>
|
|
<a class="add_field btn btn-primary">{{ __('diagnoses.add_more')}}</a>
|
|
<br><br>
|
|
</div>
|
|
</div>
|
|
|
|
{{ Form::button(__('diagnoses.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
|
{{ Form::button(__('diagnoses.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
|
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script src="{{ asset('elite/js/validator.js') }}"></script>
|
|
<script src="{{ asset('js/diagnosis/create.js') }}"></script>
|
|
<script src="{{ asset('elite/bower_components/select2/select2.min.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>
|
|
$('#insurance_tariffs').select2({
|
|
placeholder: "Select",
|
|
width: "100%"
|
|
});
|
|
$('#hmis_category_inpatient_options, #hmis_category_inpatient, #parent_dependent_option, #outpatient_hmis_category, #outpatient_hmis_category_option, #outpatient_dependent_option').select2();
|
|
$('#dependent_option, #outpatient_parent_dependent_option, #outpatient_district_code').hide();
|
|
|
|
$('#hmis_category_inpatient_options').change(function(e) {
|
|
var parent_id = $('#hmis_category_inpatient_options').val();
|
|
var div = 'parent_dependent_option';
|
|
const parents = Object.values(@json($parent_categories));
|
|
// console.log(parents.findIndex(check_options));
|
|
if (parents.findIndex(check_options) !== -1) {
|
|
dependent_category_options(parent_id, div);
|
|
$('#dependent_option').show();
|
|
}else if ($('#dependent_option').is(':visible')) {
|
|
$('#dependent_option').hide();
|
|
$('#parent_dependent_option').prop('selectedIndex',0);
|
|
$('#parent_dependent_option').prop('required',false);
|
|
}
|
|
|
|
});
|
|
$('#outpatient_hmis_category_option').change(function(){
|
|
var option = $('#outpatient_hmis_category_option').val();
|
|
var div = 'outpatient_dependent_option';
|
|
const parent_options = Object.values(@json($parent_categories));
|
|
if(option == '655'){
|
|
$('#outpatient_district_code').show();
|
|
$('#district_code').addClass('compulsory');
|
|
$('#district_code').prop('required', true);
|
|
}else {
|
|
if($('#district_code').is(':visible')) $('#district_code').val('');
|
|
if (parent_options.findIndex(check_option) !== -1) {
|
|
dependent_category_options(option, div);
|
|
$('#outpatient_parent_dependent_option').show();
|
|
}else if ($('#outpatient_parent_dependent_option').is(':visible')) {
|
|
$('#outpatient_parent_dependent_option').hide();
|
|
$('#outpatient_dependent_option').prop('selectedIndex',0);
|
|
$('#outpatient_dependent_option').prop('required',false);
|
|
}else if ($('#outpatient_district_code').is(':visible')) {
|
|
$('#district_code').prop('required', false);
|
|
$('#district_code').removeClass('compulsory');
|
|
$('#outpatient_district_code').hide();
|
|
}
|
|
}
|
|
});
|
|
|
|
function check_options(parent_id) {
|
|
return parent_id == $('#hmis_category_inpatient_options').val();
|
|
}
|
|
|
|
function check_option(parent_id) {
|
|
return parent_id == $('#outpatient_hmis_category_option').val();
|
|
}
|
|
|
|
|
|
$('#hmis_category_inpatient').change(function(e) {
|
|
category_options('hmis_category_inpatient');
|
|
});
|
|
|
|
$('#outpatient_hmis_category').change(function(e) {
|
|
category_options('outpatient_hmis_category');
|
|
});
|
|
|
|
function category_options(data){
|
|
let category = $('#'+data).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 {
|
|
var option = (data == 'hmis_category_inpatient')? 'hmis_category_inpatient_options':'outpatient_hmis_category_option';
|
|
$('#'+option).html(response);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function dependent_category_options(option, div){
|
|
let category = option;
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/get_dependent_hmis_category_options",
|
|
data: {parent_category: category},
|
|
cache: false,
|
|
success: function (response) {
|
|
if(response == 'false'){
|
|
alert("<?php echo __('procedures.failed_options'); ?>");
|
|
} else {
|
|
$('#' + div).html(response);
|
|
$('#' + div).prop('required',true);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
@endpush
|