@extends('layouts.main') @push('styles') @endpush @php $section_number = '3'; $inpatient =array_filter($hmis_categories, function ($item) use ($section_number) { return $item['section_number'] == $section_number; }); $type = '0'; $outpatient =array_filter($hmis_categories, function ($item) use ($type) { return $item['type'] == $type; }); @endphp @section('content')

{{ __('procedures.edit_procedure') }}

@include('clinical_data::procedures.menu')
@include('flash::message')
{{ Form::model($procedure, ['method' => 'PUT', 'route' => ['procedures.update',$procedure], 'data-toggle' => 'validator']) }}
{{ Form::label('name', __('procedures.procedure_name')) }} {{ Form::text('name', $procedure->name, ['class' => 'form-control compulsory', 'required']) }}
{{ Form::label('code', 'Item Code') }} {{ Form::text('code', $procedure->code, ['class' => 'form-control']) }}
{{ Form::label('non_insured_price', __('procedures.non_insured_price')) }} {{ Form::text('non_insured_price', $procedure->non_insured_price, ['class' => 'form-control compulsory', 'required']) }}
@if($procedure->price_list_category && $procedure->price_list_category != '') @php $price_list_categories = explode(",", $procedure->price_list_category); $price_list_prices = explode(",", $procedure->price_list_price); @endphp @for($i = 0; $i < count($price_list_categories); $i++)
{{ Form::label('non_insured_price', get_name($price_list_categories[$i], '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']) }}
@endfor @endif
{{ Form::label('category', __('procedures.category')) }} {{ Form::select('category', $procedure_categories, $procedure->category_id, ['class' => 'form-control compulsory', 'required','id' =>'category']) }}
{{ Form::label('available', __('procedures.is_procedure_available')) }}  {{ Form::radio('available', 1, $procedure->available == 1, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('procedures.yes') }}    {{ Form::radio('available', 0, $procedure->available == 0, ["required", 'class' => 'check form-control', 'data-radio'=>'iradio_flat-green']) }} {{ __('procedures.no') }}
@php $reference_name = !empty($procedure->reference_text)? explode(",", $procedure->reference_text):[]; $reference_array = !empty($procedure->reference_link)? explode(",", $procedure->reference_link): []; @endphp @if (!empty($reference_array) && !empty($reference_name)) {{ Form::label('reference_text', __('symptoms.reference_area')) }} @for($i = 0; $i < count($reference_array); $i++)
{{ Form::text('reference_text[]', $reference_name[$i] ?? '', ['class'=>'form-control', 'placeholder' => 'Reference Name']) }}
{{ Form::url('reference_link[]', $reference_array[$i] ?? '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
@endfor @if (count($reference_array) < 4) @endif @else
{{ Form::label('reference_text', __('symptoms.reference_area')) }}
{{ Form::text('reference_text[]', '', ['class'=>'form-control', 'placeholder' => 'Reference Name']) }}
{{ Form::url('reference_link[]', '', ['class'=>'form-control', 'placeholder' => 'eg http://www.google.com']) }}
@endif
{{ Form::label('hmis_number', 'HMIS No.') }} {{ Form::text('hmis_number', $procedure->hmis_number, ['class'=>'form-control']) }}
{{ Form::label('account_id',__('procedures.chart_of_account_name')) }} {{ Form::select('account_id',$chart_of_accounts, $procedure->account_id,['class' => 'form-control compulsory', 'required', 'id' =>'account_id']) }}
hmis_no_outpatient)); $hmis_category_array = array_filter(explode(",", $procedure->hmis_category)); ?> @if(count($hmis_no_outpatient_array) > 0 && count($hmis_category_array) > 0) @for ($x = 0; $x < count($hmis_no_outpatient_array); $x++)
{{ Form::label('hmis_no_outpatient', 'HMIS-out-patient No.') }} {{ Form::text('hmis_no_outpatient[]', $hmis_no_outpatient_array[$x], ['class'=>'form-control']) }}
{{ Form::label('hmis_category', 'HMIS category (Out Patient)') }} {{ Form::select('hmis_category[]', $hmis_categories, $hmis_category_array[$x], ['class' => 'form-control']) }}
@endfor @else
{{ Form::label('hmis_no_outpatient', 'HMIS-out-patient No.') }} {{ Form::text('hmis_no_outpatient[]', '', ['class'=>'form-control']) }}
{{ Form::label('hmis_category', 'HMIS category (Out Patient)') }}
@endif
{{ __('procedures.add_more') }}


HMIS Inpatient Report (108)

@if (is_null($procedure->hmis_inpatient_type) || $procedure->hmis_inpatient_type == '0')
{{ Form::label('hmis_category_inpatient', 'HMIS category (In Patient)') }}
{{ Form::label('hmis_category_inpatient_options', __('diagnoses.hmis_inpatient_category')) }}
{{ Form::label('hysterectomy_type', 'Hysterectomy type') }}
@else @php $inpatient_option =$procedure->hmis_category_inpatient; $inpatient_other = array_filter($inpatient, function ($item) use ($inpatient_option) { return $item['id'] !== $inpatient_option; }); $inpatient_selected = array_filter($inpatient, function ($item) use ($inpatient_option) { return $item['id'] == $inpatient_option; }); $categories_option = $procedure->hmis_no_inpatient; $selected_hmis_categories_option=array_filter($hmis_categories_options, function ($item) use ($categories_option) { return $item['id'] == $categories_option; }); $other_hmis_categories_options= array_filter($hmis_categories_options, function ($item) use ($categories_option) { return $item['id'] != $categories_option; }); @endphp
{{ Form::label('hmis_category_inpatient', 'HMIS category (In Patient)') }}
{{ Form::label('hmis_category_inpatient_options', 'HMIS Category Options') }}
{{ Form::label('hysterectomy_type', 'Hysterectomy type') }}
@endif {{ Form::button(__('procedures.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }} {{ Form::button(__('procedures.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }} {{ Form::close() }}
@endsection @push('scripts') @endpush