mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
resolved conflicts
This commit is contained in:
+154
@@ -0,0 +1,154 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@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">{{ __('drugs.create_multiple_drugs') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.create_multiple_drugs') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
@include ('errors.list')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::open(['route' => ['drugs.bulk_store']]) }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_categories') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_unit') }}</th>
|
||||
<th>{{ __('drugs.drug_prompt') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.stock_level') }}</th>
|
||||
<th>{{ __('drugs.re_order_level') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
<th>{{ __('drugs.supplier') }}</th>
|
||||
<th>{{ __('drugs.cost_price') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
<th>{{ __('drugs.description') }}</th>
|
||||
<th>{{ __('drugs.income_account') }}</th>
|
||||
<th>{{ __('drugs.cost_of_goods_account') }}</th>
|
||||
<th>{{ __('drugs.inventory_account') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_categories') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_unit') }}</th>
|
||||
<th>{{ __('drugs.drug_prompt') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.stock_level') }}</th>
|
||||
<th>{{ __('drugs.re_order_level') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
<th>{{ __('drugs.supplier') }}</th>
|
||||
<th>{{ __('drugs.cost_price') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
<th>{{ __('drugs.description') }}</th>
|
||||
<th>{{ __('drugs.income_account') }}</th>
|
||||
<th>{{ __('drugs.cost_of_goods_account') }}</th>
|
||||
<th>{{ __('drugs.inventory_account') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@for($i = 0; $i < 50; $i++)
|
||||
<tr>
|
||||
<td>
|
||||
{{ Form::text('name[]', '', ['class' => 'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('category_id[]', $drug_categories, null, ['class' => 'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('form_id[]', $drug_forms, null, ['class'=>'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('unit_id[]', $drug_units, null, ['class'=>'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('prompt[]', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('info_english[]', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('info_vernacular[]', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('store_stock[]', '', ['class' => 'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('reorder_level[]', '', ['class' => 'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::date('expiry_date[]', null, ['class' => 'form-control compulsory'])}}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('supplier_id[]', $suppliers, null, ['class'=>'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('cost_price[]', '', ['class'=>'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('non_insured_price[]', '', ['class'=>'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('description[]', '', ['class'=>'form-control', 'rows' => 2]) }}
|
||||
</td>
|
||||
<td>{{ Form::select('account_id[]', $income_accounts, null, ['class'=>'form-control compulsory']) }}</td>
|
||||
<td>{{ Form::select('cog_account[]', $cost_of_goods_accounts, null, ['class'=>'form-control compulsory']) }}</td>
|
||||
<td>{{ Form::select('inventory_account[]', $inventory_asset_accounts, null, ['class'=>'form-control compulsory']) }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-rounded 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('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
pageLength: 100
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+534
@@ -0,0 +1,534 @@
|
||||
@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/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">{{ __('drugs.new_drug') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.register') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<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">{{ __('drugs.streamline_setup_eigth_of_ten') }}</font></h3>
|
||||
{{ Form::open(['route' => 'drugs.store','data-toggle'=>'validator']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('category_id', __('drugs.drug_category')) }}
|
||||
{{ Form::select('category_id', $drug_categories, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('form_id', __('drugs.drug_form')) }}
|
||||
{{ Form::select('form_id', $drug_forms, null, ['class'=>'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('available', __('drugs.is_drug_available'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('available', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
{{ __('drugs.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('unit_id', __('drugs.drug_unit')) }}
|
||||
{{ Form::select('unit_id', $drug_units, null, ['class'=>'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pack', __('drugs.pack')) }}
|
||||
{{ Form::number('pack', '', ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('strength', __('drugs.strength')) }}
|
||||
{{ Form::number('strength', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('supplier_id', __('drugs.supplier')) }}
|
||||
{{ Form::select('supplier_id', $suppliers, null, ['class'=>'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('package_unit_id', __('drugs.package_unit')) }}
|
||||
{{ Form::select('package_unit_id', $package_units, null, ['class'=>'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('',__('drugs.does_package_unit_have_sub_packages'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('does_package_unit_have_sub_packages', 1, false, ['class' => 'check form-control have_sub_package', 'data-radio'=>'iradio_flat-green', 'id' => 'does_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
{{ __('drugs.no') }} {{ Form::radio('does_package_unit_have_sub_packages', 0, false, ['class' => 'check form-control have_sub_package', 'data-radio'=>'iradio_flat-green', 'id' => 'does_not_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_package_unit_div">
|
||||
{{ Form::label('quantity_in_each_package_unit', __('drugs.quantity_in_each_package_unit')) }}
|
||||
{{ Form::number('quantity_in_each_package_unit', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('quantity_in_each_sub_package', __('drugs.quantity_in_each_sub_package')) }}
|
||||
{{ Form::number('quantity_in_each_sub_package', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('number_of_sub_packages_in_main_package', __('drugs.number_of_sub_packages_in_main_package')) }}
|
||||
{{ Form::number('number_of_sub_packages_in_main_package', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('description', __('drugs.drug_description')) }}
|
||||
{{ Form::textArea('description', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('prompt', __('drugs.drug_prompt')) }}
|
||||
{{ Form::textArea('prompt', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="form-group">
|
||||
{{ Form::label('store_stock', __('drugs.current_store_stock')) }}
|
||||
{{ Form::number('store_stock', 0, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pharmacy_stock', __('drugs.current_pharmacy_stock')) }}
|
||||
{{ Form::number('pharmacy_stock', 0, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>-->
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('reorder_level', __('drugs.re_order_level')) }}
|
||||
{{ Form::number('reorder_level', '', ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cost_price', __('drugs.cost_price')) }}
|
||||
{{ Form::number('cost_price', '', ['class'=>'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id', __('drugs.income_account')) }}
|
||||
{{ Form::select('account_id', $income_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cog_account', __('drugs.cost_of_goods_account')) }}
|
||||
{{ Form::select('cog_account', $cost_of_goods_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('inventory_account', __('drugs.inventory_asset_account')) }}
|
||||
{{ Form::select('inventory_account', $inventory_asset_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('expiry_date', __('drugs.inventory_asset_account')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('expiry_date', '', ['class'=>'form-control', 'readonly', 'id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('non_insured_price', __('drugs.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('info_english', __('drugs.patient_info_in_english')) }}
|
||||
{{ Form::textArea('info_english', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('info_vernacular', __('drugs.patient_info_in_vernacular')) }}
|
||||
{{ Form::textArea('info_vernacular', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="background: #eceeef;">
|
||||
<h4>{{ __('drugs.select_from_list') }}</h4>
|
||||
<input id="select_all" type="checkbox"> <b>Select All</b><br><br>
|
||||
@foreach ($default_drugs as $defaultDrug)
|
||||
<div class="form-group">
|
||||
{{ Form::checkbox('selected_drugs[]', $defaultDrug['name'], false, ['class' => 'item_checkbox']) }} {{ $defaultDrug['name'] }}
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::button(__('drugs.next'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10 next']) }}
|
||||
{{ Form::button(__('drugs.skip'),['type'=>'submit','name' => 'skip', 'value' => 'skip','class'=>'btn btn-default waves-effect waves-light m-r-10']) }}
|
||||
@else
|
||||
|
||||
{{ Form::open(['route' => 'drugs.store','data-toggle'=>'validator']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('category_id', __('drugs.drug_category')) }}
|
||||
{{ Form::select('category_id', $drug_categories, null, ['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('form_id', __('drugs.drug_form')) }}
|
||||
{{ Form::select('form_id', $drug_forms, null, ['class'=>'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('available', __('drugs.is_drug_available'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('available', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
{{ __('drugs.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('unit_id', __('drugs.drug_unit')) }}
|
||||
{{ Form::select('unit_id', $drug_units, null, ['class'=>'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pack', __('drugs.pack')) }}
|
||||
{{ Form::number('pack', '', ['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('strength', __('drugs.strength')) }}
|
||||
{{ Form::number('strength', '', ['class' => 'form-control compulsory', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('supplier_id', __('drugs.supplier')) }}
|
||||
{{ Form::select('supplier_id', $suppliers, null, ['class'=>'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('package_unit_id', __('drugs.purchasing_package_unit')) }}
|
||||
{{ Form::select('package_unit_id', $package_units, null, ['class'=>'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('',__('drugs.does_package_unit_have_sub_packages'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('does_package_unit_have_sub_packages', 1, false, ['class' => 'check form-control', 'data-radio'=>'iradio_flat-green', 'required', 'id' => 'does_have_sub_package2', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
{{ __('drugs.no') }} {{ Form::radio('does_package_unit_have_sub_packages', 0, false, ['class' => 'check form-control have_sub_package', 'data-radio'=>'iradio_flat-green', 'required', 'id' => 'does_not_have_sub_package2', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_package_unit_div">
|
||||
{{ Form::label('quantity_in_each_package_unit', __('drugs.quantity_in_each_package_unit')) }}
|
||||
{{ Form::number('quantity_in_each_package_unit', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('quantity_in_each_sub_package', __('drugs.quantity_in_each_sub_package')) }}
|
||||
{{ Form::number('quantity_in_each_sub_package', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('number_of_sub_packages_in_main_package', __('drugs.number_of_sub_packages_in_main_package')) }}
|
||||
{{ Form::number('number_of_sub_packages_in_main_package', '', ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!-- <div class="form-group">
|
||||
{{ Form::label('store_stock', __('drugs.current_store_stock')) }}
|
||||
{{ Form::number('store_stock', 0, ['class' => 'form-control compulsory', 'id' => 'store_stock']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pharmacy_stock', __('drugs.current_pharmacy_stock')) }}
|
||||
{{ Form::number('pharmacy_stock', 0, ['class' => 'form-control', 'id' => 'pharmacy_stock']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>-->
|
||||
|
||||
<div class="form-group" id="initial_div" style="display: none;">
|
||||
<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<span>
|
||||
{!! __('drugs.initial_stock_count_explanation') !!}
|
||||
</span>
|
||||
</div>
|
||||
{{ Form::label('is_initial_stock_count', __('drugs.is_initial_stock_count')) }}
|
||||
{{ Form::select('is_initial_stock_count', [0 => 'No', 1 => 'Yes'], null, ['class' => 'form-control compulsory','required']) }}
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('reorder_level', __('drugs.re_order_level')) }}
|
||||
{{ Form::number('reorder_level', '', ['class' => 'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cost_price', __('drugs.cost_price')) }}
|
||||
{{ Form::number('cost_price', '', ['class'=>'form-control compulsory']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id', __('drugs.income_account')) }}
|
||||
{{ Form::select('account_id', $income_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cog_account', __('drugs.cost_of_goods_account')) }}
|
||||
{{ Form::select('cog_account', $cost_of_goods_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('inventory_account', __('drugs.inventory_asset_account')) }}
|
||||
{{ Form::select('inventory_account', $inventory_asset_accounts, null, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('expiry_date', __('drugs.drug_expiry_date')) }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('expiry_date', '', ['class'=>'form-control compulsory', 'readonly', 'id'=>'datepicker-autoclose']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{{ Form::label('', __('drugs.long_term'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('long_term', 1, false, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
{{ __('drugs.no') }} {{ Form::radio('long_term', 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('non_insured_price', 'Cash 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('description', __('drugs.drug_description')) }}
|
||||
{{ Form::textArea('description', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('prompt', __('drugs.drug_prompt')) }}
|
||||
{{ Form::textArea('prompt', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('info_english', __('drugs.patient_info_in_english')) }}
|
||||
{{ Form::textArea('info_english', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('info_vernacular', __('drugs.patient_info_in_vernacular')) }}
|
||||
{{ Form::textArea('info_vernacular', '', ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('reference_text', __('symptoms.reference_area')) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('reference_name[]', '', ['class'=>'form-control', 'placeholder' => 'Reference Name']) }}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::url('reference_areas[]', '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 input_fields_wrap"></div>
|
||||
<div class="col-sm-12"><a class="add_field_button" style="color: blue;">{{ __('symptoms.add_more') }}</a></div>
|
||||
</div>
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10 submit-btn']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-rounded btn-default waves-effect waves-light']) }}
|
||||
@endif
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<!-- <script src="{{ asset('elite/js/validator.js') }}"></script> -->
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.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 type="text/javascript">
|
||||
$('#datepicker-autoclose').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
|
||||
$(".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;
|
||||
}
|
||||
});
|
||||
|
||||
$('#select_all').change(function() {
|
||||
if (this.checked === true) {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$(".item_checkbox").each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#pharmacy_stock,#store_stock').change(function(e) {
|
||||
if ($('#pharmacy_stock').val() > 0 || $('#store_stock').val()) {
|
||||
$('#initial_div').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('#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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function displaySubPackagesDivs() {
|
||||
if (document.getElementById("does_have_sub_package1").checked) {
|
||||
document.querySelector(".quantity_in_each_package_unit_div").style.display = "block";
|
||||
document.querySelector(".quantity_in_each_sub_package_div").style.display = "none";
|
||||
}
|
||||
if (document.getElementById("does_not_have_sub_package1").checked) {
|
||||
document.querySelector(".quantity_in_each_package_unit_div").style.display = "block";
|
||||
document.querySelector(".quantity_in_each_sub_package_div").style.display = "none";
|
||||
}
|
||||
|
||||
if (document.getElementById("does_have_sub_package2").checked) {
|
||||
document.querySelector(".quantity_in_each_package_unit_div").style.display = "block";
|
||||
document.querySelector(".quantity_in_each_sub_package_div").style.display = "none";
|
||||
}
|
||||
if (document.getElementById("does_not_have_sub_package2").checked) {
|
||||
document.querySelector(".quantity_in_each_package_unit_div").style.display = "block";
|
||||
document.querySelector(".quantity_in_each_sub_package_div").style.display = "none";
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
var max_fields = 4; //maximum input boxes allowed
|
||||
var wrapper = $(".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_name[]" required/></div>' +
|
||||
'<div class="col-sm-7"><input type="url" placeholder="eg http://www.google.com" class="form-control compulsory" name="reference_areas[]" 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--;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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">{{ __('drugs.edit_drug') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug], 'data-toggle' => 'validator']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('category_id', __('drugs.drug_category')) }}
|
||||
{{ Form::select('category_id', $drug_categories, $drug->category_id, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('form_id', __('drugs.drug_form')) }}
|
||||
{{ Form::select('form_id', $drug_forms, $drug->form_id, ['class'=>'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('available', __('drugs.is_drug_available'), ["class"=>'col-md-12']) }}
|
||||
{{ __('drugs.yes') }} {{ Form::radio('available', 1, $drug->available == 1, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
{{ __('drugs.no') }} {{ Form::radio('available', 0, $drug->available == 0, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('unit_id', __('drugs.drug_unit')) }}
|
||||
{{ Form::select('unit_id', $drug_units, $drug->unit_id, ['class'=>'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pharmacy_stock', __('drugs.current_pharmacy_stock')) }}
|
||||
{{ Form::number('pharmacy_stock', $drug->pharmacy_stock, ['class'=>'form-control compulsory', 'required', 'readonly']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('store_stock', __('drugs.current_store_stock')) }}
|
||||
{{ Form::number('store_stock', $drug->quantity, ['class' => 'form-control compulsory', 'required', 'readonly']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('reorder_level', __('drugs.re_order_level')) }}
|
||||
{{ Form::number('reorder_level', $drug->reorder_level, ['class' => 'form-control compulsory', 'required']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('', __('drugs.long_term'), ["class"=>'col-md-12']) }}
|
||||
Yes {{ Form::radio('long_term', 1, $drug->long_term == 1, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
No {{ Form::radio('long_term', 0, $drug->long_term == 0, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('hssip', __('drugs.hssip')) }}
|
||||
{{ Form::text('hssip', $drug->hssip, ['class'=>'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('account_id', __('drugs.income_account')) }}
|
||||
{{ Form::select('account_id', $income_accounts, $drug->account_id, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cog_account', __('drugs.cost_of_goods_account')) }}
|
||||
{{ Form::select('cog_account', $cost_of_goods_accounts, $drug->cost_of_goods_account, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('inventory_account', __('drugs.inventory_asset_account')) }}
|
||||
{{ Form::select('inventory_account', $inventory_asset_accounts, $drug->inventory_account, ['class' => 'form-control']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@php
|
||||
$reference_array = !empty($drug->reference_areas)? explode(",", $drug->reference_areas):[];
|
||||
$reference_name = !empty($drug->reference_name)? explode(",", $drug->reference_name): [];
|
||||
@endphp
|
||||
@if (!empty($reference_array) && !empty($reference_name))
|
||||
@for($i = 0; $i < count($reference_array); $i++)
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('reference_name[]', $reference_name[$i] ?? '', ['class'=>'form-control', 'placeholder' => 'Reference Name']) }}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::url('reference_areas[]', $reference_array[$i] ?? '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
|
||||
</div>
|
||||
</div>
|
||||
@endfor
|
||||
@if (count($reference_array) < 4)
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-12 input_fields_wrap"></div>
|
||||
<div class="col-sm-12"><a class="add_field_button" style="color: blue;">{{ __('symptoms.add_more') }}</a></div>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="form-group">
|
||||
{{ Form::label('reference_text', __('symptoms.reference_area')) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('reference_name[]', '', ['class'=>'form-control', 'placeholder' => 'Reference Name']) }}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
{{ Form::url('reference_areas[]', '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 input_fields_wrap"></div>
|
||||
<div class="col-sm-12"><a class="add_field_button" style="color: blue;">{{ __('symptoms.add_more') }}</a></div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-rounded btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-rounded btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ 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 type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var max_fields = 4; //maximum input boxes allowed
|
||||
var wrapper = $(".input_fields_wrap"); //Fields wrapper
|
||||
let number = {{ count($reference_array) }};
|
||||
var x = number? number: 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_name[]" required/></div><div class="help-block with-errors"></div>' +
|
||||
'<div class="col-sm-7"><input type="url" placeholder="eg http://www.google.com" class="form-control compulsory" name="reference_areas[]" required/></div><div class="help-block with-errors"></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--;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.edit_all_drugs') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_all_drugs') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all', 'data-toggle' => 'validator']]) }}
|
||||
|
||||
<div style="float: right; margin-bottom: 5px;">
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_unit') }}</th>
|
||||
<th>{{ __('drugs.pharmacy_stock') }}</th>
|
||||
<th>{{ __('drugs.store_stock') }}</th>
|
||||
<th>{{ __('drugs.re_order_level') }}</th>
|
||||
<th>{{ __('drugs.insurance_coverage') }}</th>
|
||||
<th>{{ __('drugs.long_term') }}</th>
|
||||
<th>{{ __('drugs.hssip') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_unit') }}</th>
|
||||
<th>{{ __('drugs.pharmacy_stock') }}</th>
|
||||
<th>{{ __('drugs.store_stock') }}</th>
|
||||
<th>{{ __('drugs.re_order_level') }}</th>
|
||||
<th>{{ __('drugs.insurance_coverage') }}</th>
|
||||
<th>{{ __('drugs.long_term') }}</th>
|
||||
<th>{{ __('drugs.hssip') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td hidden>
|
||||
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
<p style="display: none">{{ $drug->name }}</p>
|
||||
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('form_id[]', $drug_forms, $drug->form_id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('unit_id[]', $drug_units, $drug->unit_id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('pharmacy_stock[]', $drug->pharmacy_stock, ['class' => 'form-control', 'readonly']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('store_stock[]', $drug->store_stock, ['class' => 'form-control', 'readonly']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('reorder_level[]', $drug->reorder_level, ['class'=>'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('insurance_coverage[]', [1 => 'Yes', 0 => 'No'], $drug->insurance_coverage, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('long_term[]', [1 => 'Yes', 0 => 'No'], $drug->long_term, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::text('hssip[]', $drug->hssip, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('clinical_data::drugs.menu')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
pageLength: 100,
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.edit_all_calculations') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_all_calculations') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_calculations', 'data-toggle' => 'validator']]) }}
|
||||
|
||||
<div style="float: right; margin-bottom: 5px;">
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_pack') }}</th>
|
||||
<th>{{ __('drugs.drug_strength') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_form') }}</th>
|
||||
<th>{{ __('drugs.drug_pack') }}</th>
|
||||
<th>{{ __('drugs.drug_strength') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td hidden>
|
||||
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
<p style="display: none">{{ $drug->name }}</p>
|
||||
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::select('form_id[]', $drug_forms, $drug->form_id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('pack[]', $drug->pack, ['class' => 'form-control', 'step' => '.01']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('strength[]', $drug->strength, ['class' => 'form-control', 'step' => '.01']) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit', 'class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('clinical_data::drugs.menu')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
pageLength: 100
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
|
||||
<style>
|
||||
th, td { white-space: nowrap; }
|
||||
</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">{{ __('drugs.edit_all_pricing') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_all_pricing') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_pricing']]) }}
|
||||
|
||||
@php $id = 1; @endphp
|
||||
|
||||
<div style="float: right; margin-bottom: 5px;">
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.buying') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
@if(get_ward_prescription_model() == 2)
|
||||
<th>{{ __('drugs.pf_adult') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_adult') }}</th>
|
||||
<th>{{ __('drugs.pf_children') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_children') }}</th>
|
||||
<th>{{ __('drugs.pf_infant') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_infant') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.buying') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
@if(get_ward_prescription_model() == 2)
|
||||
<th>{{ __('drugs.pf_adult') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_adult') }}</th>
|
||||
<th>{{ __('drugs.pf_children') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_children') }}</th>
|
||||
<th>{{ __('drugs.pf_infant') }}</th>
|
||||
<th>{{ __('drugs.daily_cost_infant') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
@php
|
||||
$non_insured_price_id = 'non_insured_price' . $id;
|
||||
$pricing_factor_adult = 'pricing_factor_adult' . $id;
|
||||
$dc_adult = 'ip_daily_cost_adult' . $id;
|
||||
$pricing_factor_children = 'pricing_factor_children' . $id;
|
||||
$dc_children = 'ip_daily_cost_children' . $id;
|
||||
$pricing_factor_infant = 'pricing_factor_infant' . $id;
|
||||
$dc_infant = 'ip_daily_cost_infant' . $id;
|
||||
@endphp
|
||||
<tr>
|
||||
<td hidden>
|
||||
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
<p style="display: none">{{ $drug->name }}</p>
|
||||
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('cost_price[]', $drug->cost_price , ['class' => 'form-control compulsory']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('non_insured_price[]', $drug->non_insured_price , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'id' => $non_insured_price_id]) }}
|
||||
</td>
|
||||
@if(get_ward_prescription_model() == 2)
|
||||
<td>
|
||||
{{ Form::number('pricing_factor_adult[]', $drug->pricing_factor_adult , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_adult]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('ip_daily_cost_adult[]', ($drug->pricing_factor_adult * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_adult]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('pricing_factor_children[]', $drug->pricing_factor_children , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_children]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('ip_daily_cost_children[]', ($drug->pricing_factor_children * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_children]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('pricing_factor_infant[]', $drug->pricing_factor_infant , ['class' => 'form-control compulsory', 'onchange' => 'calcPrices(' . $id . ');', 'step' => '0.01', 'id' => $pricing_factor_infant]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::number('ip_daily_cost_infant[]', ($drug->pricing_factor_infant * $drug->non_insured_price) , ['class' => 'form-control', 'readonly' => 'true', 'id' => $dc_infant]) }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@php $id++ @endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('clinical_data::drugs.menu')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
pageLength: 200
|
||||
});
|
||||
|
||||
function calcPrices(id) {
|
||||
calcAdult(id);
|
||||
calcChild(id);
|
||||
calcInfant(id);
|
||||
}
|
||||
|
||||
function calcAdult(id) {
|
||||
let price_factor = $('#pricing_factor_adult' + id).val();
|
||||
let non_insured_price = $('#non_insured_price' + id).val();
|
||||
$('#ip_daily_cost_adult' + id).val(price_factor * non_insured_price);
|
||||
}
|
||||
|
||||
function calcChild(id) {
|
||||
let price_factor = $('#pricing_factor_children' + id).val();
|
||||
let non_insured_price = $('#non_insured_price' + id).val();
|
||||
$('#ip_daily_cost_children' + id).val(price_factor * non_insured_price);
|
||||
}
|
||||
|
||||
function calcInfant(id) {
|
||||
let price_factor = $('#pricing_factor_infant' + id).val();
|
||||
let non_insured_price = $('#non_insured_price' + id).val();
|
||||
$('#ip_daily_cost_infant' + id).val(price_factor * non_insured_price);
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.edit_all_prompts') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_all_prompts') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
{{ Form::model($drugs, ['method' => 'ANY', 'route' => ['drugs.update_all_prompts', 'data-toggle' => 'validator']]) }}
|
||||
|
||||
<div style="float: right; margin-bottom: 5px;">
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_prompt') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.pharmacy_comment') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th hidden>{{ __('drugs.id') }}</th>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.drug_prompt') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.pharmacy_comment') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td hidden>
|
||||
{{ Form::text('id[]', $drug->id, ['class' => 'form-control']) }}
|
||||
</td>
|
||||
<td>
|
||||
<p style="display: none">{{ $drug->name }}</p>
|
||||
{{ Form::text('name[]', $drug->name, ['class' => 'form-control compulsory', 'required']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('prompt[]', $drug->prompt, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('info_english[]', $drug->info_english, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('info_vernacular[]', $drug->info_vernacular, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textArea('pharmacy_comment[]', $drug->pharmacy_comment, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('clinical_data::drugs.menu')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
pageLength: 100
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@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">{{ __('drugs.edit_drug_calculation') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_calculation') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
|
||||
|
||||
<!--- hidden input to differentiate store value -->
|
||||
{{ Form::hidden('id', 2) }}
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('form_id', __('drugs.drug_form')) }}
|
||||
{{ Form::select('form_id', $drug_forms, null, ['class'=>'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pack', __('drugs.drug_pack')) }}
|
||||
{{ Form::number('pack', $drug->pack, ['class'=>'form-control compulsory', 'step' => '.01']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('strength', __('drugs.drug_strength')) }}
|
||||
{{ Form::number('strength', $drug->strength, ['class' => 'form-control compulsory', 'step' => '.01']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
Executable
+114
@@ -0,0 +1,114 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@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">{{ __('drugs.edit_drug_pricing') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_pricing') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
|
||||
|
||||
{{ Form::hidden('id', 1) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('cost_price', __('drugs.buying')) }}
|
||||
{{ Form::number('cost_price', $drug->cost_price , ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('non_insured_price', __('drugs.non_insured_price')) }}
|
||||
{{ Form::number('non_insured_price', $drug->non_insured_price , ['class' => 'form-control compulsory', 'id' => 'non_insured_price']) }}
|
||||
</div>
|
||||
|
||||
@if($drug->price_list_category && $drug->price_list_category != '')
|
||||
@php
|
||||
$price_list_categories = explode(",", $drug->price_list_category);
|
||||
$price_list_prices = explode(",", $drug->price_list_price);
|
||||
@endphp
|
||||
|
||||
@for($i = 0; $i < count($price_list_categories); $i++)
|
||||
<div class="form-group">
|
||||
{{ Form::label('non_insured_price', get_name(get_name($price_list_categories[$i], 'id', 'price_list_categories', 'price_list_categories'), 'id', 'name', 'patient_categories').' Price') }}
|
||||
{{ Form::hidden('price_list_category_id[]', $price_list_categories[$i]) }}
|
||||
{{ Form::number('price_list_price[]', $price_list_prices[$i], ['class'=>'form-control price_list_price']) }}
|
||||
</div>
|
||||
@endfor
|
||||
@endif
|
||||
|
||||
@if(get_ward_prescription_model() == 2)
|
||||
<div class="form-group">
|
||||
{{ Form::label('pricing_factor_adult', __('drugs.pf_adult')) }}
|
||||
{{ Form::number('pricing_factor_adult', $drug->pricing_factor_adult , ['class' => 'form-control compulsory', 'onchange' => 'calcAdult(this.value);', 'step' => '0.01']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('ip_daily_cost_adult', __('drugs.daily_cost_adult')) }}
|
||||
{{ Form::number('ip_daily_cost_adult', $drug->ip_daily_cost_adult , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_adult']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pricing_factor_children', __('drugs.pf_children')) }}
|
||||
{{ Form::number('pricing_factor_children', $drug->pricing_factor_children , ['class' => 'form-control compulsory', 'onchange' => 'calcChild(this.value);', 'step' => '0.01']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('ip_daily_cost_children', __('drugs.daily_cost_children')) }}
|
||||
{{ Form::number('ip_daily_cost_children', $drug->ip_daily_cost_children , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_children']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pricing_factor_infant', __('drugs.pf_infant')) }}
|
||||
{{ Form::number('pricing_factor_infant', $drug->pricing_factor_infant , ['class' => 'form-control compulsory', 'onchange' => 'calcInfant(this.value);', 'step' => '0.01']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('ip_daily_cost_infant', __('drugs.daily_cost_infant')) }}
|
||||
{{ Form::number('ip_daily_cost_infant', $drug->ip_daily_cost_infant , ['class' => 'form-control', 'readonly' => 'true', 'id' => 'ip_daily_cost_infant']) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function calcAdult(price) {
|
||||
let non_insured_price = document.getElementById('non_insured_price').value;
|
||||
document.getElementById('ip_daily_cost_adult').value = price * non_insured_price;
|
||||
}
|
||||
|
||||
function calcChild(price) {
|
||||
let non_insured_price = document.getElementById('non_insured_price').value;
|
||||
document.getElementById('ip_daily_cost_children').value = price * non_insured_price;
|
||||
}
|
||||
|
||||
function calcInfant(price) {
|
||||
let non_insured_price = document.getElementById('non_insured_price').value;
|
||||
document.getElementById('ip_daily_cost_infant').value = price * non_insured_price;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@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">{{ __('drugs.edit_drug_prompt') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_prompt') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($drug, ['method' => 'PUT', 'route' => ['drugs.update',$drug]]) }}
|
||||
|
||||
<!--- hidden input to differentiate store value -->
|
||||
{{ Form::hidden('id', 0) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('prompt', __('drugs.drug_prompt')) }}
|
||||
{{ Form::textArea('prompt', $drug->prompt, ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('info_english', __('drugs.english_info')) }}
|
||||
{{ Form::textArea('info_english', $drug->info_english, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('info_vernacular', __('drugs.vernacular_info')) }}
|
||||
{{ Form::textArea('info_vernacular', $drug->info_vernacular, ['class'=>'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('pharmacy_comment', __('drugs.pharmacy_comment')) }}
|
||||
{{ Form::textArea('pharmacy_comment', $drug->pharmacy_comment, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('description', __('drugs.drug_description')) }}
|
||||
{{ Form::textArea('description', $drug->description, ['class' => 'form-control', 'rows' => 4]) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
docker/statistics/Modules/ClinicalData/Resources/views/drugs/edit/items_purchase_packaging.blade.php
Executable
+65
@@ -0,0 +1,65 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@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">{{ __('drugs.edit_drug_prompt') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.edit_prompt') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
{{ Form::model($drug, ['method' => 'ANY', 'route' => ['drugs.update_purchase_packaging',$drug]]) }}
|
||||
|
||||
<!--- hidden input to differentiate store value -->
|
||||
{{ Form::hidden('id', $drug->id) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', __('drugs.drug_name')) }}
|
||||
{{ Form::text('name', $drug->name, ['class' => 'form-control compulsory']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('',__('drugs.does_package_unit_have_sub_packages')) }}
|
||||
<br>
|
||||
{{ __('drugs.yes') }} {{ Form::radio('does_package_unit_have_sub_packages', 1, false, ['class' => 'have_sub_package', 'required', 'id' => 'does_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
{{ __('drugs.no') }} {{ Form::radio('does_package_unit_have_sub_packages', 0, false, ['class' => 'have_sub_package', 'required', 'id' => 'does_not_have_sub_package1', 'onclick'=>'displaySubPackagesDivs()']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_package_unit_div">
|
||||
{{ Form::label('quantity_in_each_package_unit', __('drugs.quantity_in_each_package_unit')) }}
|
||||
{{ Form::number('quantity_in_each_package_unit', $drug->quantity_in_each_package_unit, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('quantity_in_each_sub_package', __('drugs.quantity_in_each_sub_package')) }}
|
||||
{{ Form::number('quantity_in_each_sub_package', $drug->quantity_in_each_sub_package, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group quantity_in_each_sub_package_div">
|
||||
{{ Form::label('number_of_sub_packages_in_main_package', __('drugs.number_of_sub_packages_in_main_package')) }}
|
||||
{{ Form::number('number_of_sub_packages_in_main_package', $drug->number_of_sub_packages_in_main_package_unit, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type' => 'submit','class' =>' btn btn-success waves-effect waves-light m-r-10']) }}
|
||||
{{ Form::button(__('drugs.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
@endsection
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.activate_drugs') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.activate') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<p class="text-muted m-b-30">{{ __('drugs.export_data_to_csv_and_excel') }}</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table color-bordered-table success-bordered-table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.selling') }}</th>
|
||||
<th>{{ __('drugs.prompt') }}</th>
|
||||
<th>{{ __('drugs.pharmacy') }}</th>
|
||||
<th>{{ __('drugs.store') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.selling') }}</th>
|
||||
<th>{{ __('drugs.prompt') }}</th>
|
||||
<th>{{ __('drugs.pharmacy') }}</th>
|
||||
<th>{{ __('drugs.store') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td>{{ get_drug_name($drug->id) }}</td>
|
||||
<td>{{ $drug->selling_price }}</td>
|
||||
<td>{{ $drug->prompt }}</td>
|
||||
<td>{{ $drug->pharmacy_stock }}</td>
|
||||
<td>{{ $drug->store_stock}}</td>
|
||||
<td>{{ $drug->info_vernacular }}</td>
|
||||
<td>{{ $drug->info_english }}</td>
|
||||
<td>
|
||||
{{ Form::model($drug->id ,['method' => 'POST', 'route' => ['drugs.activate', $drug->id]]) }}
|
||||
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('drugs.are_you_sure')?>')"><i class="fa fa-check"></i> {{ __('drugs.activate') }}</button>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<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>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.drugs') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.view') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@include('clinical_data::drugs.menu')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="white-box">
|
||||
<!--<p class="text-muted m-b-30">Export data to Copy, CSV, Excel, PDF & Print</p>-->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
<th>{{ __('drugs.prompts_and_references') }}</th>
|
||||
<th>{{ __('drugs.pharmacy') }}</th>
|
||||
<th>{{ __('drugs.store') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.non_insured_price') }}</th>
|
||||
<th>{{ __('drugs.prompts_and_references') }}</th>
|
||||
<th>{{ __('drugs.pharmacy') }}</th>
|
||||
<th>{{ __('drugs.store') }}</th>
|
||||
<th>{{ __('drugs.vernacular_info') }}</th>
|
||||
<th>{{ __('drugs.english_info') }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td>{{ get_drug_name($drug->id) }}</td>
|
||||
<td>{{ $drug->non_insured_price }}</td>
|
||||
@php
|
||||
$reference_array = explode(",", $drug->reference_areas);
|
||||
$reference_name = explode(",", $drug->reference_name);
|
||||
$drug_pharmacy_stock = $drug_store_stock = 0;
|
||||
|
||||
$batch_records = \Streamline\Models\ItemBatchWatcher::where(['item_type' => 1, 'item_id' => $drug->id])->get();
|
||||
if (count($batch_records) > 0) {
|
||||
foreach ($batch_records as $batch_record) {
|
||||
$drug_store_stock += $batch_record->store_stock;
|
||||
$drug_pharmacy_stock += $batch_record->pharmacy_stock;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<td>
|
||||
{{ $drug->prompt }} <br>
|
||||
@for ($i=0; $i<count($reference_array); $i++)
|
||||
<br><a style="font-weight:normal; color: red" href="{{ $reference_array[$i] ?? '' }}" target="blank">{{ $reference_name[$i] ?? '' }}</a>
|
||||
@endfor
|
||||
{{-- <a style="font-weight:normal; color: red" href="{{ $reference_array[0] }}" target="blank">{{ $reference_name[0] }}</a> --}}
|
||||
</td>
|
||||
<td>{{ $drug_pharmacy_stock }}</td>
|
||||
<td>{{ $drug_store_stock}}</td>
|
||||
<td>{{ $drug->info_vernacular }}</td>
|
||||
<td>{{ $drug->info_english }}</td>
|
||||
<td>
|
||||
@if( Auth::user()->can('drug-edit'))
|
||||
<a href="/drugs/{{ $drug->id }}/edit/" class="btn btn-rounded btn-warning"><i class="fa fa-pencil"></i> {{ __('drugs.edit') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->can('drug-delete') && empty($drug->pharmacy_stock) && empty($drug->store_stock) && empty($drug->opening_stock) && empty($ordered_drugs[$drug->id]))
|
||||
{{ Form::model($drug->id ,['method' => 'DELETE', 'route' => ['drugs.destroy', $drug->id]]) }}
|
||||
<button type="submit" class="btn btn-rounded btn-danger" onclick="return confirm('<?php echo __('insurance_groups.are_you_sure')?>')"><i class="fa fa-trash"></i> {{ __('drugs.delete') }}</button>
|
||||
{{ Form::close() }}
|
||||
@elseif (Auth::user()->can('drug-delete') && (!empty($drug->pharmacy_stock) || !empty($drug->store_stock) || !empty($drug->opening_stock)))
|
||||
<b class="text-success">Still Stocked</b>
|
||||
@elseif (Auth::user()->can('drug-delete') && !empty($ordered_drugs[$drug->id]))
|
||||
<b class="text-success">Drug was issued</b>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->can('drug-edit'))
|
||||
<button type="button" class="btn btn-rounded btn-primary" data-toggle="modal" data-target="#myModal" onclick="setButtonUrls({{ $drug->id }})">{{ __('drugs.other_options') }}</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="myModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="" class="btn btn-block btn-rounded btn-warning" id="drug_calcs"><i class="fa fa-pencil"></i> <span style="margin-left: 10px;">
|
||||
<strong>{{ __('drugs.edit_drug_calculations') }}</strong></span></a>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="" class="btn btn-block btn-rounded btn-warning" id="drug_price"><i class="fa fa-pencil"></i> <span style="margin-left: 10px;">
|
||||
<strong>{{ __('drugs.edit_drug_pricing') }}</strong></span></a>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="" class="btn btn-block btn-rounded btn-warning" id="drug_prompt"><i class="fa fa-pencil"></i> <span style="margin-left: 10px;">
|
||||
<strong>{{ __('drugs.edit_drug_prompt') }}</strong></span></a>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="" class="btn btn-block btn-rounded btn-warning" id="drug_package_unit"><i class="fa fa-pencil"></i> <span style="margin-left: 10px;">
|
||||
<strong>{{ __('drugs.edit_package_units_details') }}</strong></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function setButtonUrls(id){
|
||||
let drug_calcs = document.getElementById('drug_calcs');
|
||||
drug_calcs.href = "/drugs/edit/drugs_calculations/" + id;
|
||||
let drug_price = document.getElementById('drug_price');
|
||||
drug_price.href = "/drugs/edit/drugs_pricing/" + id;
|
||||
let drug_prompt = document.getElementById('drug_prompt');
|
||||
drug_prompt.href = "/drugs/edit/drugs_prompts/" + id;
|
||||
let drug_purchase_details = document.getElementById('drug_package_unit');
|
||||
drug_purchase_details.href = "/edit_items_purchase_packaging/" + id;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<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/tables/js/buttons.colVis.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
ordering:false,
|
||||
pageLength: 100,
|
||||
buttons: [
|
||||
'copy',
|
||||
{ extend: 'csv',
|
||||
message: 'LIST OF DRUGS'
|
||||
},
|
||||
{ extend: 'excel',
|
||||
message: 'LIST OF DRUGS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4, 5 ]
|
||||
},
|
||||
sheetName: 'LIST OF DRUGS ON STREAMLINE'
|
||||
},
|
||||
{ extend: 'pdf',
|
||||
message: 'LIST OF DRUGS',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LETTER',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4, 5 ]
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.defaultStyle.fontSize = 10;
|
||||
// doc.styles.tableHeader.alignment = 'left';
|
||||
}
|
||||
},
|
||||
{ extend: 'print',
|
||||
message: 'LIST OF DRUGS',
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 4, 5 ]
|
||||
},
|
||||
customize: function (win) {
|
||||
$(win.document.body)
|
||||
.css('font-size', '10pt')
|
||||
.css('background', '#fff')
|
||||
.prepend(
|
||||
'<img src="<?php echo asset('uploads/logo/logo-sm.png'); ?>" style="position:absolute; top:0; right:0;" />'
|
||||
);
|
||||
$(win.document.body).find('table')
|
||||
.addClass('compact')
|
||||
.css('font-size', 'inherit');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+143
@@ -0,0 +1,143 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
@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">{{ __('drugs.expired_drugs') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.expiring') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{{ Form::open(['route' => 'drugs.index_drugs_expiring']) }}
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('time_period', __('drugs.expiring_with_in')) }}
|
||||
{{ Form::select('time_period', ['1' => __('drugs.1_week'), '2' => __('drugs.2_weeks'), '4' => __('drugs.1_month'), '3' => __('stores.date_range'), '0' => __('drugs.expired_drugs')], $range, ['class' => 'form-control', 'id'=>'time_period']) }}
|
||||
</div>
|
||||
<div class="form-group" style="display: none;" id="start-date-div">
|
||||
{{ Form::label('start_date', "Start Date") }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date',$started ?? '',['class' => 'form-control compulsory', 'id'=>'datepicker-from']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;" id="end-date-div">
|
||||
{{ Form::label('end_date', "End Date") }}
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', $ended ?? '',['class' => 'form-control compulsory','id'=>'datepicker-to']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success btn-rounded waves-effect waves-light m-r-10']) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.stock') }}</th>
|
||||
<th class="shown_input">{{ __('drugs.batch_details') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.stock') }}</th>
|
||||
<th class="shown_input">{{ __('drugs.batch_details') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td>{{ get_drug_name($drug->item_id) }}</td>
|
||||
<td>{{ ($drug->store_stock ?? 0) + ($drug->pharmacy_stock ?? 0) + ($drug->ward_stock ?? 0)}}</td>
|
||||
<td>
|
||||
{{ $drug->batch_number }}
|
||||
</td>
|
||||
<td>{{ streamline_date($drug->expiry_date) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
let range = {{ $range }};
|
||||
$('#table').DataTable({
|
||||
pageLength: 100,
|
||||
});
|
||||
|
||||
$('#datepicker-to, #datepicker-from').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
if(range == '3') {
|
||||
$('#end-date-div, #start-date-div').show();
|
||||
$('#datepicker-to, #datepicker-from').prop('required', true);
|
||||
}
|
||||
$('#time_period').change(function() {
|
||||
var val = $(this).val();
|
||||
if(val == '3'){
|
||||
$('#end-date-div, #start-date-div').show();
|
||||
$('#datepicker-to, #datepicker-from').prop('required', true);
|
||||
}
|
||||
else {
|
||||
$('#end-date-div, #start-date-div').hide();
|
||||
$('#datepicker-to, #datepicker-from').prop('required', false);
|
||||
$('#datepicker-to, #datepicker-from').val('');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<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" />
|
||||
@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">{{ __('drugs.drugs_out_of_stock') }}</h4>
|
||||
</div>
|
||||
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('home') }}">{{ __('drugs.dashboard') }}</a></li>
|
||||
<li><a href="{{ route('drugs.index') }}">{{ __('drugs.drugs') }}</a></li>
|
||||
<li class="active">{{ __('drugs.out_of_stock') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!--Flash messages at the top -->
|
||||
@include('flash::message')
|
||||
<div class="white-box">
|
||||
<p class="text-muted m-b-30">{{ __('drugs.export_data_to_csv_and_excel') }}</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.store_stock') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ __('drugs.drug_name') }}</th>
|
||||
<th>{{ __('drugs.store_stock') }}</th>
|
||||
<th>{{ __('drugs.expiry_date') }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($drugs as $drug)
|
||||
<tr>
|
||||
<td>{{ get_drug_name($drug->id) }}</td>
|
||||
<td>{{ $drug->store_stock}}</td>
|
||||
<td>{{ streamline_date($drug->expiry_date) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<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>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<a href="/drugs/bulk_create" class="nav-item btn btn-success" style="border-radius: 5px;"><i class="fa fa-plus"></i> <span style="margin-left: 10px">{{ __('drugs.add_bulk_drugs') }}</span></a>
|
||||
<a href="/drugs/edit/all" class="nav-item btn btn-warning" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('drugs.edit_all_drugs') }}</span></a>
|
||||
<a href="/drugs/edit/all_prompts" class="nav-item btn btn-warning" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('drugs.edit_all_prompts') }}</span></a>
|
||||
<a href="/drugs/edit/all_calculations" class="nav-item btn btn-warning" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('drugs.edit_all_calculations') }}</span></a>
|
||||
<a href="/drugs/edit/all_pricing" class="nav-item btn btn-warning" style="border-radius: 5px;"><i class="fa fa-pencil"></i> <span style="margin-left: 10px">{{ __('drugs.edit_all_pricing') }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user