@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('insurance_members.create_insurance_member') }}

@include('flash::message') @include('insurance::insurance_members.menu')
{{ Form::open(['route' => 'insurance_members.store','method'=>'POST','enctype'=>'multipart/form-data','data-toggle'=>'validator','autocomplete'=>'off']) }}
{{ Form::label('first_name',__('insurance_members.first_name')) }} {{ Form::text('first_name','',['class' => 'form-control compulsory', 'required', 'data-error'=>'','placeholder'=>'Christian name eg Fred', 'id' => 'first_name']) }}
{{ Form::label('last_name',__('insurance_members.last_name')) }} {{ Form::text('last_name','',['class' => 'form-control compulsory', 'required','placeholder'=>'Surname eg Asiimwe', 'id' => 'last_name']) }}
{{ Form::label('gender',__('insurance_members.gender')) }}
{{ Form::radio('gender', 1, false, ["required"]) }} {{ __('insurance_members.male') }}    {{ Form::radio('gender', 2, false, ["required"]) }} {{ __('insurance_members.female') }}
{{ Form::label('national_id',__('insurance_members.national_id_number')) }} {{ Form::text('national_id','',['class' => 'form-control','maxlength'=>15]) }}
{{ Form::label('date_of_birth',__('insurance_members.date_of_birth')) }}
{{ Form::text('date_of_birth','',['class' => 'form-control compulsory','readonly','id'=>'date_of_birth']) }}
@if (!empty($errors->get('date_of_birth')))
@foreach ($errors->get('date_of_birth') as $message) {{ $message }} @endforeach
@endif
{{ Form::label('age',__('insurance_members.years')) }} {{ Form::number('age_in_years','',['class' => 'form-control compulsory','id'=>'age_in_years','min'=>'0']) }} @if (!empty($errors->get('age_in_years')))
@foreach ($errors->get('age_in_years') as $message) {{ $message }} @endforeach
@endif
{{ Form::label('age',__('insurance_members.months')) }} {{ Form::number('age_in_months','',['class' => 'form-control','id'=>'age_in_months','readonly','min'=>'0']) }}
{{ Form::label('marital_status',__('insurance_members.marital_status')) }}
@foreach($marital_statuses as $key=>$value) {{ Form::radio('marital_status', $key,false,['required']) }} {{ $value }}    @endforeach
{{ Form::label('religion',__('insurance_members.religion')) }} {{ Form::select('religion',$religions,'',['class' => 'form-control compulsory','required']) }}
{{ Form::label('occupation',__('insurance_members.occupation')) }} {{ Form::select('occupation',$occupations,'',['class' => 'form-control compulsory occupation', 'required']) }} {{ __('insurance_members.add_new_occupation') }}
{{ Form::label('next_of_kin',__('insurance_members.next_of_kin')) }} {{ Form::text('next_of_kin','',['class' => 'form-control', 'onchange' => "show('kin_div')"]) }}
{{ Form::label('phone',__('insurance_members.phone_number')) }} {{ Form::text('phone','',['class' => 'form-control', 'id' => 'phone']) }} (07xx) 123-456
{{ Form::label('phone_owner',__('insurance_members.phone_owner')) }}
{{ Form::radio('phone_owner','self',false,['id'=>'owned',"required"]) }} {{ __('insurance_members.self') }}    {{ Form::radio('phone_owner','other',false,['id'=>'non_owned',"required"]) }} {{ __('insurance_members.other') }}
{{ Form::label('lc_one', __('insurance_members.name_of_lc1_chairman')) }} {{ Form::text('lc_one','',['class' => 'form-control compulsory', 'data-error'=>'LC 1 chairman\'s name']) }}
{{ Form::label('contact',__('insurance_members.any_hospital_contact')) }}
{{ Form::radio('contact','yes',false,['id'=>'h_contact_yes','required']) }} {{ __('insurance_members.yes') }}    {{ Form::radio('contact','no',false,['id'=>'h_contact_no','required']) }} {{ __('insurance_members.no') }}
{{ Form::label('patient_category',__('insurance_members.patient_category'))}} {{ Form::select('patient_category',$patient_categories,'5',['class' => 'form-control compulsory', 'required', 'data-error'=>'']) }}
{{ Form::label('language',__('insurance_members.preferred_language')) }} {{ Form::select('language',['vern'=>'Vernacular','eng'=>'English',],'vern',['class' => 'form-control compulsory', 'required', 'data-error'=>'Select the language']) }}
{{ Form::label('citizenship',__('patients.citizenship')) }} {{ Form::select('citizenship',['1'=>'Ugandan','0'=>'Non Ugandan'],'',['class' => 'form-control compulsory', 'required', 'data-error'=>'Select the language','id' => 'citizenship']) }}
{{ Form::label('residence','Residence') }}
{{ __('patients.add_new_residence') }}
@if(is_fingerprint_enabled())
{{ Form::label('fingerprint_template',__('patients.patient_fingerprint')) }}
{{ Form::hidden('fingerprint_template', '', ['id' => 'fingerprint_template']) }}

@endif {{--
{{ Form::label('district_id',__('insurance_members.district')) }} {{ Form::select('district_id',$districts,'',['class' => 'form-control compulsory district', 'required', 'data-error'=>'']) }} {{ __('insurance_members.add_new_district') }}
{{ __('insurance_members.add_new_county') }}
{{ __('insurance_members.add_new_subcounty') }}
{{ __('insurance_members.add_new_parish') }}
{{ __('insurance_members.add_new_village') }}
--}}
{{ Form::label('duplicate_research_id', __('insurance.research_id')) }} {{ Form::text('duplicate_research_id', null, ['class' => 'form-control']) }} @if (!empty($errors->get('duplicate_research_id')))
@foreach ($errors->get('duplicate_research_id') as $message) {{ $message }} @endforeach
@endif
{{ Form::label('is_family_head',__('insurance_members.is_member_head_of_family')) }}
{{ Form::radio('is_family_head', 1, false, ["required",'onclick'=>'displayFamilies(1)']) }} {{ __('insurance_members.yes') }}    {{ Form::radio('is_family_head', 0, false, ["required",'onclick'=>'displayFamilies(0)']) }} {{ __('insurance_members.no') }}
{{ Form::label('relationship_to_head', __('insurance_members.relationship_to_head')) }} {{ Form::select('relationship_to_head', $relations, 1, ['class' => 'form-control compulsory']) }}
{{ Form::label('group_id', __('insurance_members.insurance_group')) }} {{ Form::select('group_id', $insurance_groups, null, ['class' => 'form-control compulsory', 'required', 'id' => 'group_id']) }}
{{ Form::label('chi_plan', __('insurance.chi_plan')) }} {{ Form::select('chi_plan', $chi_plans, null, ['class' => 'form-control compulsory', 'required', 'id' => 'chi_plan']) }}
{{--
{{ Form::label('other_plan', __('insurance.other_plan')) }} {{ Form::select('other_plan', $chi_plans, null, ['class' => 'form-control']) }}
--}}
{{ Form::label('risk_id',__('insurance.risk')) }} {{ Form::select('risk_id[]', $chi_risks, '',['class' => 'form-control compulsory risk_id', 'data-error'=>'Select the risk', 'required', 'multiple']) }}
{{ Form::label('member_premium', __('insurance.member_premium')) }} {{ Form::number('member_premium', null, ['class' => 'form-control compulsory', 'required']) }}
@if( Auth::user()->can('register-chi-members-with-pre-existing-premiums'))
{{ Form::label('does_member_have_existing_premium',__('insurance_members.does_member_have_existing_premium')) }}
{{ Form::radio('does_member_have_existing_premium', 1, false, ["required",'onclick'=>'displayPremiumActiveDateDiv(1)']) }} {{ __('insurance_members.yes') }}    {{ Form::radio('does_member_have_existing_premium', 0, false, ["required",'onclick'=>'displayPremiumActiveDateDiv(0)']) }} {{ __('insurance_members.no') }}
@endif
{{ Form::label('title', __('insurance.title')) }} {{ Form::select('title', $person_titles, null, ['class' => 'form-control compulsory', 'required']) }}
{{ Form::label('photo',__('insurance_members.photo')) }} {{ Form::file('photo',['class' => 'form-control']) }}
{{ Form::label('membership_start_date', __('insurance.membership_start_date')) }}
{{ Form::text('membership_start_date','',['class' => 'form-control','readonly','id'=>'membership_start_date']) }}
{{ Form::label('membership_registration_date', __('insurance.membership_registration_date')) }}
{{ Form::text('membership_registration_date','',['class' => 'form-control','readonly','id'=>'membership_registration_date']) }}
{{ Form::label('social_security_number', __('insurance.social_security_number')) }} {{ Form::text('social_security_number', null, ['class' => 'form-control']) }}
{{ Form::label('research_id', __('insurance.research_id')) }} {{ Form::text('research_id', null, ['class' => 'form-control']) }} @if (!empty($errors->get('research_id')))
@foreach ($errors->get('research_id') as $message) {{ $message }} @endforeach
@endif
{{ Form::label('next_anniversary_date', __('insurance.next_anniversary_date_bracket_moved_with_rollover')) }}
{{ Form::text('next_anniversary_date','',['class' => 'form-control','readonly','id'=>'next_anniversary_date']) }}
{{ Form::button(__('insurance_members.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }} {{ Form::button(__('insurance_members.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
@endsection @push('scripts') @endpush