 
<?php $__env->startSection('title', 'EAC Input Form'); ?>
<?php $__env->startSection('content'); ?>  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>  
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.min.css">

<?php 
    $getstatecodedata = DB::table('state_master')->get();
    $getdistrictcodedata = DB::table('district_master')->get();
    $getbtamasterdata = DB::table('bta_master')->get();
    $getintmasterdata = DB::table('int_master')->get();
    $getadhmasterdata = DB::table('adh_master')->get();
    $getsupmasterdata = DB::table('sup_master')->get();

    $adminstatecode = auth()->user()->state_code;
    $admindistcode = auth()->user()->dist_code;
    $art_centre_code = auth()->user()->art_centre_code;
    $emp_code = auth()->user()->emp_code;
    $role_name  = auth()->user()->roles->pluck('name');
    if($role_name[0] == "Super Admin" || $role_name[0] == "Admin")
    {
        $getartcentredata = DB::table('art_centre_master')->get();
        $getpatregdata = DB::table('patient_mapping')->get();
    }
    else if($role_name[0] == "State_Manager")
    {
        $getartcentredata = DB::table('art_centre_master')->where('state_code',$adminstatecode)->get();
        $getpatregdata = DB::table('patient_mapping')->where('state_code',$adminstatecode)->get();
    }
    else if($role_name[0] == "District_Manager")
    {
        $getartcentredata = DB::table('art_centre_master')->where('dist_code',$admindistcode)->get();
        $getpatregdata = DB::table('patient_mapping')->where('dist_code',$admindistcode)->get();
    }
    else
    {
        $getartcentredata = DB::table('art_centre_master')->where(['state_code'=>$adminstatecode,'dist_code'=>$admindistcode])->get();
        $getpatregdata = DB::table('patient_mapping')->where('emp_code',$emp_code)->get();
    }
?>

<div class="container-fluid">
    <div class="page-header">
        <div class="row align-items-end">
            <div class="col-lg-8">
                <div class="page-header-title">
                    <i class="ik ik-edit bg-blue"></i>
                    <div class="d-inline">
                        <h5><?php echo e(__('EAC Input Form')); ?></h5>
                    </div>
                </div>
            </div>
            <div class="col-lg-4">
                <nav class="breadcrumb-container" aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(route('dashboard')); ?>"><i class="ik ik-home"></i></a>
                        </li>
                        <li class="breadcrumb-item"><a href="#"><?php echo e(__('Forms')); ?></a></li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-7 mx-auto">
            <div class="card">
                <div class="card-header"><h3><?php echo e(__('EAC Input Form')); ?></h3></div>
                <div class="card-body">
                    <form class="forms-sample"  method='POST' <?php if(!empty($showdata)): ?> action="<?php echo e(url('updateeacinput')); ?>" <?php else: ?> action="<?php echo e(url('inserteacinput')); ?>" <?php endif; ?> name='patientregister'>
                        <?php echo csrf_field(); ?>
                        
                        <?php if(!empty($showdata)): ?>
                        <input type='hidden' name='id' value='<?php echo e($showdata[0]->id); ?>'>
                        <?php endif; ?>

                        <input type="hidden" class="form-control" id="doe" name='doe' <?php if(!empty($showdata)){ ?> value="<?php echo e($showdata[0]->doe); ?>" <?php } else{?> value="<?php echo e(date('Y-m-d')); ?>"<?php } ?> placeholder="Enter Date of Entry" readonly>
                        <input type="hidden" class="form-control" id="state_code" name='state_code' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->state_code); ?>' <?php } else{?> value='<?php echo e(auth()->user()->state_code); ?>'<?php } ?> placeholder="Enter State code" readonly>
                        <input type="hidden" class="form-control" id="dist_code" name='dist_code' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->dist_code); ?>' <?php } else{?> value='<?php echo e(auth()->user()->dist_code); ?>'<?php } ?> placeholder="Enter District code" readonly>
                        <input type="hidden" class="form-control" id="emp_code" name='emp_code' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->emp_code); ?>' <?php } else{?> value='<?php echo e(auth()->user()->emp_code); ?>'<?php } ?> placeholder="Enter Staff code" readonly>
                        <input type="hidden" class="form-control" id="art_centre_code" name='art_centre_code' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->art_centre_code); ?>' <?php } else{?> value='<?php echo e(auth()->user()->art_centre_code); ?>'<?php } ?> placeholder="Enter Staff code" readonly>

                        <?php if(!empty($showdata)): ?>
                        <?php
                        $patdata = DB::table('patient_register')->where('id',$showdata[0]->pat_uid)->first();
                        ?>
                        <?php endif; ?>

                        <div class="form-group">
                            <label for="pat_uid"><?php echo e(__('Client UID')); ?></label>
                            <select name='pat_uid' id='pat_uid' class='form-control' <?php if(!empty($showdata[0]->pat_uid)): ?> disabled="" <?php endif; ?> required>
                                <option value="">Select Client UID</option>
                                <?php foreach($getpatregdata as $getpatmap)
                                { 
                                    $getpatreg = DB::table('patient_register')->where('id',$getpatmap->pat_uid)->first();
                                    $patmapdata = DB::table('patient_mapping')->where(['pat_uid'=>$getpatreg->id,'linelist_status'=>'Open'])->where('linelist_type',3)->where('emp_code',$emp_code)->count();
                                    $eacdata = DB::table('eac_input')->where(['pat_uid'=>$getpatreg->id])->where('eac_visit','<',7)->count();
                                    if($patmapdata > 0 && $eacdata <= 0){
                                ?> 
                                 <option value='<?php echo $getpatreg->id; ?>' <?php if(!empty($showdata)): ?><?php echo e($patdata->pat_uid == $getpatreg->pat_uid ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getpatreg->pre_art_reg_num.' | '.$getpatreg->art_reg_num.' | '.$getpatreg->pat_name; ?></option>
                                <?php 
                                    } 
                                }
                                ?>
                            </select>
                            
                        </div>
                        <div class="form-group">
                            <label for="linelist_date"><?php echo e(__('Linelist Received Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='linelist_date' <?php if(!empty($showdata[0]->linelist_date)): ?> value='<?php echo e($showdata[0]->linelist_date); ?>' readonly="" <?php endif; ?> class="form-control" name="linelist_date" placeholder="dd-mm-yyyy" readonly/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="art_centre"><?php echo e(__('ART Center Code')); ?></label>
                            <input type="text" class="form-control" id="art_centre" name='art_centre' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->art_centre); ?>' <?php } ?> placeholder="Enter ART Center Name" readonly>
                        </div>
                        <div class="form-group">
                            <label for="art_centre_name"><?php echo e(__('ART Center Name')); ?></label>
                            <input type="text" class="form-control" id="art_centre_name" name='art_centre_name' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->art_centre_name); ?>' <?php } ?> placeholder="Enter ART Center Name" readonly>
                        </div>
                        <div class="form-group">
                            <label for="pre_art_reg_num"><?php echo e(__('Pre ART REG Number')); ?></label>
                            <input type="text" class="form-control" id="pre_art_reg_num" name='pre_art_reg_num' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->pre_art_reg_num); ?>' <?php } ?> placeholder="Enter Pre ART REG Number" readonly>
                        </div>
                        <div class="form-group">
                            <label for="art_reg_num"><?php echo e(__('ART REG Number')); ?></label>
                            <input type="text" class="form-control" id="art_reg_num" name='art_reg_num' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->art_reg_num); ?>' <?php } ?> placeholder="Enter ART REG Number" readonly>                            
                        </div>
                        <div class="form-group">
                            <label for="pat_name"><?php echo e(__('Client Name')); ?></label>
                            <input type="text" class="form-control" id="pat_name" name='pat_name' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->pat_name); ?>' <?php } ?> placeholder="Enter Client Name" readonly>
                        </div>
                        <div class="form-group">
                            <label for="pat_age"><?php echo e(__('Client Age')); ?></label>
                            <input type="number" class="form-control" id="pat_age" name='pat_age' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->pat_age); ?>' <?php } ?> placeholder="Enter Client Age" readonly>
                        </div>
                        <div class="form-group">
                            <label for="pat_sex"><?php echo e(__('Client Sex')); ?></label>
                            <input type="text" class="form-control" id="pat_sex" name='pat_sex' <?php if(!empty($showdata)){ ?> value='<?php echo e($patdata->pat_sex); ?>' <?php } ?> placeholder="Enter Client Sex" readonly>
                        </div>
                        <div class="form-group outreach_calling">
                            <label for="vl_test_date"><?php echo e(__('Viral Load Test Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='vl_test_date' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->vl_test_date); ?>' readonly="" <?php endif; ?> class="form-control" name="vl_test_date" placeholder="dd-mm-yyyy" required/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="usp_vl_count"><?php echo e(__('Unsuprressed Viral Load Count')); ?></label>
                            <input type="text" class="form-control" id="usp_vl_count" name='usp_vl_count' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->usp_vl_count); ?>' readonly="" <?php } ?> placeholder="Enter Unsuprressed Viral Load Count">
                        </div>

                        <div class="form-group">
                            <label style="font-size: 18px;"><u><i><?php echo e(__('Patient Knowledge with respect to ART Treatment')); ?></i></u></label>
                        </div>
                        <div class="form-group">
                            <label for="art_adh"><?php echo e(__('ART Adherence')); ?></label><br>
                            <?php if(empty($showdata[0]->art_adh)): ?>
                            <input type='radio' value="Yes" name="art_adh" required  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->art_adh == 'Yes')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Yes</span>
                            <input type='radio' value="No" name="art_adh"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->art_adh == 'No')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">No</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->art_adh); ?>' readonly="" class="form-control" name="art_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group">
                            <label for="vlt_imp"><?php echo e(__('Viral Load Test Importance')); ?></label><br>
                            <?php if(empty($showdata[0]->vlt_imp)): ?>
                            <input type='radio' value="Yes" name="vlt_imp" required  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->vlt_imp == 'Yes')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Yes</span>
                            <input type='radio' value="No" name="vlt_imp"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->vlt_imp == 'No')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">No</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->vlt_imp); ?>' readonly="" class="form-control" name="vlt_imp"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group">
                            <label for="art_dosage"><?php echo e(__('ART Dosage/ No. of Pills to be taken (on every day)')); ?></label>
                            <input type="text" class="form-control" id="art_dosage" name='art_dosage' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->art_dosage); ?>' readonly="" <?php } ?> placeholder="Enter ART Dosage/ No. of Pills to be taken">
                        </div>
                        <div class="form-group">
                            <label style="font-size: 18px;"><u><i><?php echo e(__('Details of Caregiver')); ?></i></u></label>
                        </div>
                        <div class="form-group">
                            <label for="caregiver_name"><?php echo e(__('Caregiver Name')); ?></label>
                            <input type="text" class="form-control" id="caregiver_name" name='caregiver_name' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->caregiver_name); ?>' readonly=""  <?php } ?> placeholder="Enter Caregiver Name">
                        </div>
                        <div class="form-group">
                            <label for="caregiver_mobile"><?php echo e(__('Caregiver Mobile')); ?></label>
                            <input type="text" maxlength="10" onkeypress=" return isNumber(event)" class="form-control" id="caregiver_mobile" name='caregiver_mobile' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->caregiver_mobile); ?>' readonly="" <?php } ?> placeholder="Enter Caregiver Mobile">
                        </div>

                        <input type="hidden" name="eac_visit" <?php if(!empty($showdata)): ?> value="<?php echo e($showdata[0]->eac_visit); ?>" <?php endif; ?>>
                        <div class="form-group">
                            <label for="eac_visit"><?php echo e(__('EAC Visit')); ?></label>
                            <select name='eac_visit' id='eac_visit' class='form-control' required>
                                <?php if(empty($showdata)): ?>
                                <option value="">Select EAC Visit</option>
                                <?php endif; ?>
                                <option value="1" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 1 ? 'selected' : ''); ?> <?php endif; ?>>1st Visit</option>
                                <?php if(!empty($showdata)): ?>
                                <option value="2" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 2 ? 'selected' : ''); ?> <?php endif; ?>>2nd Visit</option>
                                <option value="3" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 3 ? 'selected' : ''); ?> <?php endif; ?>>3rd Visit</option>
                                <option value="4" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 4 ? 'selected' : ''); ?> <?php endif; ?>>4th Visit</option>
                                <option value="5" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 5 ? 'selected' : ''); ?> <?php endif; ?>>5th Visit</option>
                                <option value="6" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 6 ? 'selected' : ''); ?> <?php endif; ?>>6th Visit</option>
                                <option value="7" <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->eac_visit == 7 ? 'selected' : ''); ?> <?php endif; ?>>Final Visit</option>
                                <?php endif; ?>
                            </select>
                        </div>
                        
                        <div class="form-group suc1">
                            <label for="suc1_date"><?php echo e(__('1st Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc1_date' <?php if(!empty($showdata[0]->suc1_date)): ?> value='<?php echo e($showdata[0]->suc1_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc1_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc1">
                            <label for="suc1_mode"><?php echo e(__('1st Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc1_mode)): ?>
                            <input type='radio' value="Phone" name="suc1_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc1_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc1_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc1_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc1_mode); ?>' readonly="" class="form-control" name="suc1_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc1">
                            <label for="suc1_bat"><?php echo e(__('1st Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc1_bat' id='suc1_bat' class='form-control' <?php if(!empty($showdata[0]->suc1_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 1st Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc1_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc1_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc1_bat); ?>' readonly="" class="form-control" name="suc1_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc1_bat_other_specify <?php if(empty($showdata)): ?> suc1_other <?php endif; ?>">
                            <label for="suc1_bat_other_specify"><?php echo e(__('1st Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc1_bat_other_specify" name='suc1_bat_other_specify' <?php if(!empty($showdata[0]->suc1_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc1_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 1st Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc1">
                            <label for="suc1_int"><?php echo e(__('1st Step up counselling Intervention')); ?></label>
                            <select name='suc1_int' id='suc1_int' class='form-control' <?php if(!empty($showdata[0]->suc1_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 1st Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc1_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc1_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc1_int); ?>' readonly="" class="form-control" name="suc1_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc1_int_other_specify <?php if(empty($showdata)): ?> suc1_other <?php endif; ?>">
                            <label for="suc1_int_other_specify"><?php echo e(__('1st Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc1_int_other_specify" name='suc1_int_other_specify' <?php if(!empty($showdata[0]->suc1_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc1_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 1st Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc1">
                            <label for="suc1_adh"><?php echo e(__('1st Step up counselling Adherence')); ?></label>
                            <select name='suc1_adh' id='suc1_adh' class='form-control' <?php if(!empty($showdata[0]->suc1_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 1st Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc1_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc1_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc1_adh); ?>' readonly="" class="form-control" name="suc1_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc1_adh_other_specify <?php if(empty($showdata)): ?> suc1_other <?php endif; ?>">
                            <label for="suc1_adh_other_specify"><?php echo e(__('1st Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc1_adh_other_specify" name='suc1_adh_other_specify' <?php if(!empty($showdata[0]->suc1_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc1_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 1st Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc1">
                            <label for="suc1_sup"><?php echo e(__('1st Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc1_sup' id='suc1_sup' class='form-control' <?php if(!empty($showdata[0]->suc1_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 1st Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc1_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc1_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc1_sup); ?>' readonly="" class="form-control" name="suc1_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc1_sup_other_specify <?php if(empty($showdata)): ?> suc1_other <?php endif; ?>">
                            <label for="suc1_sup_other_specify"><?php echo e(__('1st Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc1_sup_other_specify" name='suc1_sup_other_specify' <?php if(!empty($showdata[0]->suc1_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc1_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 1st Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 1st Visit -->

                        <!-- Start 2nd Visit -->
                        <div class="form-group suc2">
                            <label for="suc2_date"><?php echo e(__('2nd Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc2_date' <?php if(!empty($showdata[0]->suc2_date)): ?> value='<?php echo e($showdata[0]->suc2_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc2_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc2">
                            <label for="suc2_mode"><?php echo e(__('2nd Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc2_mode)): ?>
                            <input type='radio' value="Phone" name="suc2_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc2_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc2_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc2_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc2_mode); ?>' readonly="" class="form-control" name="suc2_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc2">
                            <label for="suc2_bat"><?php echo e(__('2nd Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc2_bat' id='suc2_bat' class='form-control' <?php if(!empty($showdata[0]->suc2_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 2nd Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc2_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc2_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc2_bat); ?>' readonly="" class="form-control" name="suc2_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc2_bat_other_specify <?php if(empty($showdata)): ?> suc2_other <?php endif; ?>">
                            <label for="suc2_bat_other_specify"><?php echo e(__('2nd Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc2_bat_other_specify" name='suc2_bat_other_specify' <?php if(!empty($showdata[0]->suc2_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc2_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 2nd Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc2">
                            <label for="suc2_int"><?php echo e(__('2nd Step up counselling Intervention')); ?></label>
                            <select name='suc2_int' id='suc2_int' class='form-control' <?php if(!empty($showdata[0]->suc2_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 2nd Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc2_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc2_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc2_int); ?>' readonly="" class="form-control" name="suc2_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc2_int_other_specify <?php if(empty($showdata)): ?> suc2_other <?php endif; ?>">
                            <label for="suc2_int_other_specify"><?php echo e(__('2nd Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc2_int_other_specify" name='suc2_int_other_specify' <?php if(!empty($showdata[0]->suc2_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc2_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 2nd Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc2">
                            <label for="suc2_adh"><?php echo e(__('2nd Step up counselling Adherence')); ?></label>
                            <select name='suc2_adh' id='suc2_adh' class='form-control' <?php if(!empty($showdata[0]->suc2_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 2nd Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc2_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc2_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc2_adh); ?>' readonly="" class="form-control" name="suc2_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc2_adh_other_specify <?php if(empty($showdata)): ?> suc2_other <?php endif; ?>">
                            <label for="suc2_adh_other_specify"><?php echo e(__('2nd Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc2_adh_other_specify" name='suc2_adh_other_specify' <?php if(!empty($showdata[0]->suc2_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc2_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 2nd Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc2">
                            <label for="suc2_sup"><?php echo e(__('2nd Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc2_sup' id='suc2_sup' class='form-control' <?php if(!empty($showdata[0]->suc2_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 2nd Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc2_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc2_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc2_sup); ?>' readonly="" class="form-control" name="suc2_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc2_sup_other_specify <?php if(empty($showdata)): ?> suc2_other <?php endif; ?>">
                            <label for="suc2_sup_other_specify"><?php echo e(__('2nd Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc2_sup_other_specify" name='suc2_sup_other_specify' <?php if(!empty($showdata[0]->suc2_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc2_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 2nd Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 2nd Visit -->

                        <!-- Start 3rd Visit -->
                        <div class="form-group suc3">
                            <label for="suc3_date"><?php echo e(__('3rd Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc3_date' <?php if(!empty($showdata[0]->suc3_date)): ?> value='<?php echo e($showdata[0]->suc3_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc3_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc3">
                            <label for="suc3_mode"><?php echo e(__('3rd Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc3_mode)): ?>
                            <input type='radio' value="Phone" name="suc3_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc3_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc3_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc3_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc3_mode); ?>' readonly="" class="form-control" name="suc3_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc3">
                            <label for="suc3_bat"><?php echo e(__('3rd Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc3_bat' id='suc3_bat' class='form-control' <?php if(!empty($showdata[0]->suc3_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 3rd Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc3_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc3_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc3_bat); ?>' readonly="" class="form-control" name="suc3_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc3_bat_other_specify <?php if(empty($showdata)): ?> suc3_other <?php endif; ?>">
                            <label for="suc3_bat_other_specify"><?php echo e(__('3rd Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc3_bat_other_specify" name='suc3_bat_other_specify' <?php if(!empty($showdata[0]->suc3_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc3_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 3rd Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc3">
                            <label for="suc3_int"><?php echo e(__('3rd Step up counselling Intervention')); ?></label>
                            <select name='suc3_int' id='suc3_int' class='form-control' <?php if(!empty($showdata[0]->suc3_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 3rd Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc3_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc3_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc3_int); ?>' readonly="" class="form-control" name="suc3_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc3_int_other_specify <?php if(empty($showdata)): ?> suc3_other <?php endif; ?>">
                            <label for="suc3_int_other_specify"><?php echo e(__('3rd Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc3_int_other_specify" name='suc3_int_other_specify' <?php if(!empty($showdata[0]->suc3_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc3_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 3rd Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc3">
                            <label for="suc3_adh"><?php echo e(__('3rd Step up counselling Adherence')); ?></label>
                            <select name='suc3_adh' id='suc3_adh' class='form-control' <?php if(!empty($showdata[0]->suc3_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 3rd Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc3_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc3_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc3_adh); ?>' readonly="" class="form-control" name="suc3_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc3_adh_other_specify <?php if(empty($showdata)): ?> suc3_other <?php endif; ?>">
                            <label for="suc3_adh_other_specify"><?php echo e(__('3rd Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc3_adh_other_specify" name='suc3_adh_other_specify' <?php if(!empty($showdata[0]->suc3_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc3_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 3rd Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc3">
                            <label for="suc3_sup"><?php echo e(__('3rd Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc3_sup' id='suc3_sup' class='form-control' <?php if(!empty($showdata[0]->suc3_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 3rd Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc3_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc3_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc3_sup); ?>' readonly="" class="form-control" name="suc3_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc3_sup_other_specify <?php if(empty($showdata)): ?> suc3_other <?php endif; ?>">
                            <label for="suc3_sup_other_specify"><?php echo e(__('3rd Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc3_sup_other_specify" name='suc3_sup_other_specify' <?php if(!empty($showdata[0]->suc3_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc3_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 3rd Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 3rd Visit -->

                        <!-- Start 4th Visit -->
                        <div class="form-group suc4">
                            <label for="suc4_date"><?php echo e(__('4th Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc4_date' <?php if(!empty($showdata[0]->suc4_date)): ?> value='<?php echo e($showdata[0]->suc4_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc4_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc4">
                            <label for="suc4_mode"><?php echo e(__('4th Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc4_mode)): ?>
                            <input type='radio' value="Phone" name="suc4_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc4_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc4_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc4_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc4_mode); ?>' readonly="" class="form-control" name="suc4_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc4">
                            <label for="suc4_bat"><?php echo e(__('4th Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc4_bat' id='suc4_bat' class='form-control' <?php if(!empty($showdata[0]->suc4_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 4th Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc4_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc4_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc4_bat); ?>' readonly="" class="form-control" name="suc4_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc4_bat_other_specify <?php if(empty($showdata)): ?> suc4_other <?php endif; ?>">
                            <label for="suc4_bat_other_specify"><?php echo e(__('4th Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc4_bat_other_specify" name='suc4_bat_other_specify' <?php if(!empty($showdata[0]->suc4_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc4_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 4th Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc4">
                            <label for="suc4_int"><?php echo e(__('4th Step up counselling Intervention')); ?></label>
                            <select name='suc4_int' id='suc4_int' class='form-control' <?php if(!empty($showdata[0]->suc4_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 4th Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc4_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc4_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc4_int); ?>' readonly="" class="form-control" name="suc4_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc4_int_other_specify <?php if(empty($showdata)): ?> suc4_other <?php endif; ?>">
                            <label for="suc4_int_other_specify"><?php echo e(__('4th Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc4_int_other_specify" name='suc4_int_other_specify' <?php if(!empty($showdata[0]->suc4_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc4_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 4th Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc4">
                            <label for="suc4_adh"><?php echo e(__('4th Step up counselling Adherence')); ?></label>
                            <select name='suc4_adh' id='suc4_adh' class='form-control' <?php if(!empty($showdata[0]->suc4_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 4th Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc4_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc4_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc4_adh); ?>' readonly="" class="form-control" name="suc4_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc4_adh_other_specify <?php if(empty($showdata)): ?> suc4_other <?php endif; ?>">
                            <label for="suc4_adh_other_specify"><?php echo e(__('4th Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc4_adh_other_specify" name='suc4_adh_other_specify' <?php if(!empty($showdata[0]->suc4_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc4_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 4th Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc4">
                            <label for="suc4_sup"><?php echo e(__('4th Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc4_sup' id='suc4_sup' class='form-control' <?php if(!empty($showdata[0]->suc4_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 4th Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc4_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc4_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc4_sup); ?>' readonly="" class="form-control" name="suc4_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc4_sup_other_specify <?php if(empty($showdata)): ?> suc4_other <?php endif; ?>">
                            <label for="suc4_sup_other_specify"><?php echo e(__('4th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc4_sup_other_specify" name='suc4_sup_other_specify' <?php if(!empty($showdata[0]->suc4_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc4_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 4th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 4th Visit -->

                        <!-- Start 5th Visit -->
                        <div class="form-group suc5">
                            <label for="suc5_date"><?php echo e(__('5th Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc5_date' <?php if(!empty($showdata[0]->suc5_date)): ?> value='<?php echo e($showdata[0]->suc5_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc5_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc5">
                            <label for="suc5_mode"><?php echo e(__('5th Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc5_mode)): ?>
                            <input type='radio' value="Phone" name="suc5_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc5_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc5_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc5_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc5_mode); ?>' readonly="" class="form-control" name="suc5_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc5">
                            <label for="suc5_bat"><?php echo e(__('5th Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc5_bat' id='suc5_bat' class='form-control' <?php if(!empty($showdata[0]->suc5_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 5th Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc5_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc5_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc5_bat); ?>' readonly="" class="form-control" name="suc5_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc5_bat_other_specify <?php if(empty($showdata)): ?> suc5_other <?php endif; ?>">
                            <label for="suc5_bat_other_specify"><?php echo e(__('5th Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc5_bat_other_specify" name='suc5_bat_other_specify' <?php if(!empty($showdata[0]->suc5_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc5_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 5th Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc5">
                            <label for="suc5_int"><?php echo e(__('5th Step up counselling Intervention')); ?></label>
                            <select name='suc5_int' id='suc5_int' class='form-control' <?php if(!empty($showdata[0]->suc5_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 5th Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc5_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc5_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc5_int); ?>' readonly="" class="form-control" name="suc5_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc5_int_other_specify <?php if(empty($showdata)): ?> suc5_other <?php endif; ?>">
                            <label for="suc5_int_other_specify"><?php echo e(__('5th Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc5_int_other_specify" name='suc5_int_other_specify' <?php if(!empty($showdata[0]->suc5_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc5_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 5th Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc5">
                            <label for="suc5_adh"><?php echo e(__('5th Step up counselling Adherence')); ?></label>
                            <select name='suc5_adh' id='suc5_adh' class='form-control' <?php if(!empty($showdata[0]->suc5_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 5th Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc5_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc5_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc5_adh); ?>' readonly="" class="form-control" name="suc5_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc5_adh_other_specify <?php if(empty($showdata)): ?> suc5_other <?php endif; ?>">
                            <label for="suc5_adh_other_specify"><?php echo e(__('5th Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc5_adh_other_specify" name='suc5_adh_other_specify' <?php if(!empty($showdata[0]->suc5_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc5_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 5th Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc5">
                            <label for="suc5_sup"><?php echo e(__('5th Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc5_sup' id='suc5_sup' class='form-control' <?php if(!empty($showdata[0]->suc5_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 5th Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc5_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc5_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc5_sup); ?>' readonly="" class="form-control" name="suc5_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc5_sup_other_specify <?php if(empty($showdata)): ?> suc5_other <?php endif; ?>">
                            <label for="suc5_sup_other_specify"><?php echo e(__('5th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc5_sup_other_specify" name='suc5_sup_other_specify' <?php if(!empty($showdata[0]->suc5_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc5_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 5th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 5th Visit -->

                        <!-- Start 6th Visit -->
                        <div class="form-group suc6">
                            <label for="suc6_date"><?php echo e(__('6th Step up counselling Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='suc6_date' <?php if(!empty($showdata[0]->suc6_date)): ?> value='<?php echo e($showdata[0]->suc6_date); ?>' readonly="" <?php endif; ?> class="form-control" name="suc6_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group suc6">
                            <label for="suc6_mode"><?php echo e(__('6th Step up counselling Mode')); ?></label><br>
                            <?php if(empty($showdata[0]->suc6_mode)): ?>
                            <input type='radio' value="Phone" name="suc6_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc6_mode == 'Phone')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Phone</span>
                            <input type='radio' value="In-Person" name="suc6_mode"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->suc6_mode == 'In-Person')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">In-Person</span>
                            <?php else: ?>
                            <input type='text' value='<?php echo e($showdata[0]->suc6_mode); ?>' readonly="" class="form-control" name="suc6_mode"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc6">
                            <label for="suc6_bat"><?php echo e(__('6th Step up counselling Barrier to Adherence')); ?></label>
                            <select name='suc6_bat' id='suc6_bat' class='form-control' <?php if(!empty($showdata[0]->suc6_bat)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 6th Step up counselling Barrier to Adherence</option>
                                <?php foreach($getbtamasterdata as $getbtamaster){ ?>
                                 <option value='<?php echo $getbtamaster->bta_barriers; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc6_bat == $getbtamaster->bta_barriers ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getbtamaster->bta_barriers; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc6_bat)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc6_bat); ?>' readonly="" class="form-control" name="suc6_bat"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc6_bat_other_specify <?php if(empty($showdata)): ?> suc6_other <?php endif; ?>">
                            <label for="suc6_bat_other_specify"><?php echo e(__('6th Step up counselling Barrier to Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc6_bat_other_specify" name='suc6_bat_other_specify' <?php if(!empty($showdata[0]->suc6_bat_other_specify)): ?> value='<?php echo e($showdata[0]->suc6_bat_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 6th Step up counselling Barrier to Adherence Other Specify">
                        </div>
                        <div class="form-group suc6">
                            <label for="suc6_int"><?php echo e(__('6th Step up counselling Intervention')); ?></label>
                            <select name='suc6_int' id='suc6_int' class='form-control' <?php if(!empty($showdata[0]->suc6_int)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 6th Step up counselling Intervention</option>
                                <?php foreach($getintmasterdata as $getintmaster){ ?>
                                 <option value='<?php echo $getintmaster->int_support; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc6_int == $getintmaster->int_support ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getintmaster->int_support; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc6_int)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc6_int); ?>' readonly="" class="form-control" name="suc6_int"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc6_int_other_specify <?php if(empty($showdata)): ?> suc6_other <?php endif; ?>">
                            <label for="suc6_int_other_specify"><?php echo e(__('6th Step up counselling Intervention Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc6_int_other_specify" name='suc6_int_other_specify' <?php if(!empty($showdata[0]->suc6_int_other_specify)): ?> value='<?php echo e($showdata[0]->suc6_int_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 6th Step up counselling Intervention Other Specify">
                        </div>
                        <div class="form-group suc6">
                            <label for="suc6_adh"><?php echo e(__('6th Step up counselling Adherence')); ?></label>
                            <select name='suc6_adh' id='suc6_adh' class='form-control' <?php if(!empty($showdata[0]->suc6_adh)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 6th Step up counselling Adherence</option>
                                <?php foreach($getadhmasterdata as $getadhmaster){ ?>
                                 <option value='<?php echo $getadhmaster->adh_level; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc6_adh == $getadhmaster->adh_level ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getadhmaster->adh_level; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc6_adh)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc6_adh); ?>' readonly="" class="form-control" name="suc6_adh"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc6_adh_other_specify <?php if(empty($showdata)): ?> suc6_other <?php endif; ?>">
                            <label for="suc6_adh_other_specify"><?php echo e(__('6th Step up counselling Adherence Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc6_adh_other_specify" name='suc6_adh_other_specify' <?php if(!empty($showdata[0]->suc6_adh_other_specify)): ?> value='<?php echo e($showdata[0]->suc6_adh_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 6th Step up counselling Adherence Other Specify">
                        </div>
                        <div class="form-group suc6">
                            <label for="suc6_sup"><?php echo e(__('6th Step up counselling SUPPORT PROVIDED BY ACCELARATE')); ?></label>
                            <select name='suc6_sup' id='suc6_sup' class='form-control' <?php if(!empty($showdata[0]->suc6_sup)): ?> disabled="" <?php endif; ?>>
                                <option value="">Select 6th Step up counselling SUPPORT PROVIDED BY ACCELARATE</option>
                                <?php foreach($getsupmasterdata as $getsupmaster){ ?>
                                 <option value='<?php echo $getsupmaster->sup_reason; ?>' <?php if(!empty($showdata)): ?><?php echo e($showdata[0]->suc6_sup == $getsupmaster->sup_reason ? 'selected' : ''); ?> <?php endif; ?>><?php echo $getsupmaster->sup_reason; ?></option>
                                 <?php } ?>
                            </select>
                            <?php if(!empty($showdata[0]->suc6_sup)): ?>
                            <input type='hidden' value='<?php echo e($showdata[0]->suc6_sup); ?>' readonly="" class="form-control" name="suc6_sup"/>
                            <?php endif; ?>
                        </div>
                        <div class="form-group suc6_sup_other_specify <?php if(empty($showdata)): ?> suc6_other <?php endif; ?>">
                            <label for="suc6_sup_other_specify"><?php echo e(__('6th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify')); ?></label>
                            <input type="text" class="form-control" id="suc6_sup_other_specify" name='suc6_sup_other_specify' <?php if(!empty($showdata[0]->suc6_sup_other_specify)): ?> value='<?php echo e($showdata[0]->suc6_sup_other_specify); ?>' readonly="" <?php endif; ?> placeholder="Enter 6th Step up counselling SUPPORT PROVIDED BY ACCELARATE Other Specify">
                        </div>
                        <!-- End 6th Visit -->

                        <div class="form-group repeat_viral_load">
                            <label for="rep_vl_date"><?php echo e(__('Repeat Viral Load testing Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='rep_vl_date' <?php if(!empty($showdata)): ?> value='<?php echo e($showdata[0]->rep_vl_date); ?>' <?php endif; ?> class="form-control" name="rep_vl_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group repeat_viral_load">
                            <label for="rep_vl_res"><?php echo e(__('Repeat Viral Load Result')); ?></label>
                            <input type="text" class="form-control" onkeypress=" return isNumber(event)" onkeyup="checkVLresult()" id="rep_vl_res" name='rep_vl_res' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->rep_vl_res); ?>' <?php } ?> placeholder="Enter REP Viral Load Result">
                        </div>
                        <div class="form-group referred_sacep">
                            <label for="referred_sacep"><?php echo e(__('Referred to SACEP')); ?></label><br>
                            <input type='radio' value="Yes" name="referred_sacep"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->referred_sacep == 'Yes')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Yes</span>
                            <input type='radio' value="No" name="referred_sacep"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->referred_sacep == 'No')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">No</span>
                        </div>
                        <div class="form-group referred_sacep_type">
                            <label for="referred_sacep_type"><?php echo e(__('Referred to SACEP Type')); ?></label><br>
                            <input type='radio' value="Regimen changed" name="referred_sacep_type"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->referred_sacep_type == 'Regimen changed')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Regimen changed</span>
                            <input type='radio' value="Continue EAC" name="referred_sacep_type"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->referred_sacep_type == 'Continue EAC')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Continue EAC</span>
                            <input type='radio' value="Others Specify" name="referred_sacep_type"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->referred_sacep_type == 'Others Specify')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Others Specify</span>
                        </div>
                        <div class="form-group specify_referred_sacep">
                            <label for="specify_referred_sacep"><?php echo e(__('Specify Referred to SACEP')); ?></label><br>
                            <input type="text" class="form-control" id="specify_referred_sacep" name='specify_referred_sacep' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->specify_referred_sacep); ?>' <?php } ?> placeholder="Enter Specify Referred to SACEP">
                        </div>
                        <div class="form-group final_outcome">
                            <label for="eac_final_outcome"><?php echo e(__('EAC Final Outcome')); ?></label><br>
                            <input type='radio' value="Virally Suppressed" name="eac_final_outcome"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->eac_final_outcome == 'Virally Suppressed')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Virally Suppressed</span>
                            <input type='radio' value="Regimen Changed" name="eac_final_outcome"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->eac_final_outcome == 'Regimen Changed')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Regimen Changed</span>
                            <input type='radio' value="Others Specify" name="eac_final_outcome"  <?php if(!empty($showdata)): ?><?php echo e(($showdata[0]->eac_final_outcome == 'Others Specify')? "checked" : ""); ?> <?php endif; ?>><span class="pl-5 pr-10">Others Specify</span>
                        </div>
                        <div class="form-group specify_eac_final_outcome">
                            <label for="specify_eac_final_outcome"><?php echo e(__('Specify EAC Final Outcome')); ?></label><br>
                            <input type="text" class="form-control" id="specify_eac_final_outcome" name='specify_eac_final_outcome' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->specify_eac_final_outcome); ?>' <?php } ?> placeholder="Enter Specify EAC Final Outcome">
                        </div>
                        <div class="form-group final_outcome">
                            <label for="final_outcome_date"><?php echo e(__('Final Outcome Date')); ?></label>
                            <div class='input-group date datetimepicker'>
                                <input type='text' id='final_outcome_date' <?php if(!empty($showdata[0]->final_outcome_date)): ?> value='<?php echo e($showdata[0]->final_outcome_date); ?>' readonly="" <?php endif; ?> class="form-control" name="final_outcome_date" placeholder="dd-mm-yyyy"/>
                                <span class="input-group-addon">
                                  <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="remarks"><?php echo e(__('Remarks')); ?></label>
                            <input type="text" class="form-control" id="remarks" name='remarks' <?php if(!empty($showdata)){ ?> value='<?php echo e($showdata[0]->remarks); ?>' <?php } ?> placeholder="Enter Remarks">
                        </div>
                        <br><br>
                        <button type="submit" id="submit" class="btn btn-primary mr-2"><?php echo e(__('Submit')); ?></button>
                        <?php if(empty($showdata)): ?>
                        <a href="<?php echo e('eac-input-data'); ?>" class="btn btn-light"><?php echo e(__('Cancel')); ?></a>
                        <?php endif; ?>
                      </form>
                </div>
            </div>
        </div>
    </div>
</div>
    
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.full.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>
<script>  
    $(function() {  
        $("select").select2();
        $('.suc1').css('display','none');
        $('.suc1_other').css('display','none');
        $('.suc2').css('display','none');
        $('.suc2_other').css('display','none');
        $('.suc3').css('display','none');
        $('.suc3_other').css('display','none');
        $('.suc4').css('display','none');
        $('.suc4_other').css('display','none');
        $('.suc5').css('display','none');
        $('.suc5_other').css('display','none');
        $('.suc6').css('display','none');
        $('.suc6_other').css('display','none');
        $('.final_outcome').css('display','none');

        var eac_visit = $('#eac_visit').val();
        var pat_uid = $('#pat_uid').val();
        var linelist_type = 3;
        if(eac_visit != "")
        {
            $("#eac_visit option").each(function (index) {
                if(index != 6)
                {
                    if(index > eac_visit || index < eac_visit)
                    {
                        $(this).prop('disabled', true);
                    }
                }
            });

            if(eac_visit == 1)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','none');
                $('.suc3').css('display','none');
                $('.suc4').css('display','none');
                $('.suc5').css('display','none');
                $('.suc6').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 2)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','none');
                $('.suc4').css('display','none');
                $('.suc5').css('display','none');
                $('.suc6').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 3)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','none');
                $('.suc5').css('display','none');
                $('.suc6').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 4)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.suc5').css('display','none');
                $('.suc6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 5)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.suc5').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.suc6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 6)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.suc5').css('display','block');
                $('.suc6').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.suc5').css('display','block');
                $('.suc6').css('display','block');
                $('.final_outcome').css('display','block');
                $("#final_outcome_date").attr("required", "true");
                $('.repeat_viral_load').css('display','block');
            }
        }
        else
        {
            $('.suc1').css('display','none');
            $('.suc2').css('display','none');
            $('.suc3').css('display','none');
            $('.suc4').css('display','none');
            $('.suc5').css('display','none');
            $('.suc6').css('display','none');
            $('.final_outcome').css('display','none');
            $("#final_outcome_date").prop('required',false);
            $('.repeat_viral_load').css('display','none');
        }

        var rep_vl_res = $("input[name='rep_vl_res']").val();
        if(rep_vl_res > 1000)
        {
            $('.referred_sacep').css('display','block');
        }
        else
        {
            $('.referred_sacep').css('display','none');
            $('.referred_sacep_type').css('display','none');
        }
    
        var referred_sacep = $('input[name="referred_sacep"]:checked').val();
        if(referred_sacep == "Yes")
        {
            $('.referred_sacep_type').css('display','block');
        }
        else
        {
            $('.referred_sacep_type').css('display','none');
        }
    
        var referred_sacep_type = $('input[name="referred_sacep_type"]:checked').val();
        if(referred_sacep_type == "Others Specify")
        {
            $('.specify_referred_sacep').css('display','block');
        }
        else
        {
            $('.specify_referred_sacep').css('display','none');
        }

        var eac_final_outcome = $('input[name="eac_final_outcome"]:checked').val();
        if(eac_final_outcome == "Others Specify")
        {
            $('.specify_eac_final_outcome').css('display','block');
        }
        else
        {
            $('.specify_eac_final_outcome').css('display','none');
        }

        var default_date=  new Date();
        $('.datetimepicker').datetimepicker({  
           format: 'DD-MM-YYYY', 
            useCurrent:false, 
            defaultDate: default_date
        });
    });  

    function isNumber(evt)
    {
        evt = (evt) ? evt : window.event;
        var charCode = (evt.which) ? evt.which : evt.keyCode;
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
        return true; 
    }

    function checkVLresult()
    {
        var rep_vl_res = $('#rep_vl_res').val();
        if(rep_vl_res > 1000)
        {
            $('.referred_sacep').css('display','block');
            var referred_sacep = $('input[name="referred_sacep"]:checked').val();
            if(referred_sacep == "Yes")
            {
                $('.referred_sacep_type').css('display','block');
            }
            else
            {
                $('.referred_sacep_type').css('display','none');
            }
        }
        else
        {
            $('.referred_sacep').css('display','none');
            $('.referred_sacep_type').css('display','none');
        }
    }

    /////***SUP 1****////
    $( "#suc1_bat" ).change(function() { 
        var suc1_bat = $("#suc1_bat option:selected").text();
        if(suc1_bat == "Others (Specify)")
        {
            $('.suc1_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc1_bat_other_specify').css('display','none');
        }
    });

    $( "#suc1_int" ).change(function() { 
        var suc1_int = $("#suc1_int option:selected").text();
        if(suc1_int == "Need based referrals (Specify)")
        {
            $('.suc1_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc1_int_other_specify').css('display','none');
        }
    });

    $( "#suc1_adh" ).change(function() { 
        var suc1_adh = $("#suc1_adh option:selected").text();
        if(suc1_adh == "Others (Specify)")
        {
            $('.suc1_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc1_adh_other_specify').css('display','none');
        }
    });

    $( "#suc1_sup" ).change(function() { 
        var suc1_sup = $("#suc1_sup option:selected").text();
        if(suc1_sup == "Others (Specify)")
        {
            $('.suc1_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc1_sup_other_specify').css('display','none');
        }
    });

    /////***SUP 2****////
    $( "#suc2_bat" ).change(function() { 
        var suc2_bat = $("#suc2_bat option:selected").text();
        if(suc2_bat == "Others (Specify)")
        {
            $('.suc2_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc2_bat_other_specify').css('display','none');
        }
    });

    $( "#suc2_int" ).change(function() { 
        var suc2_int = $("#suc2_int option:selected").text();
        if(suc2_int == "Need based referrals (Specify)")
        {
            $('.suc2_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc2_int_other_specify').css('display','none');
        }
    });

    $( "#suc2_adh" ).change(function() { 
        var suc2_adh = $("#suc2_adh option:selected").text();
        if(suc2_adh == "Others (Specify)")
        {
            $('.suc2_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc2_adh_other_specify').css('display','none');
        }
    });

    $( "#suc2_sup" ).change(function() { 
        var suc2_sup = $("#suc2_sup option:selected").text();
        if(suc2_sup == "Others (Specify)")
        {
            $('.suc2_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc2_sup_other_specify').css('display','none');
        }
    });
    /////***SUP 2****////

    /////***SUP 3****////
    $( "#suc3_bat" ).change(function() { 
        var suc3_bat = $("#suc3_bat option:selected").text();
        if(suc3_bat == "Others (Specify)")
        {
            $('.suc3_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc3_bat_other_specify').css('display','none');
        }
    });

    $( "#suc3_int" ).change(function() { 
        var suc3_int = $("#suc3_int option:selected").text();
        if(suc3_int == "Need based referrals (Specify)")
        {
            $('.suc3_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc3_int_other_specify').css('display','none');
        }
    });

    $( "#suc3_adh" ).change(function() { 
        var suc3_adh = $("#suc3_adh option:selected").text();
        if(suc3_adh == "Others (Specify)")
        {
            $('.suc3_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc3_adh_other_specify').css('display','none');
        }
    });

    $( "#suc3_sup" ).change(function() { 
        var suc3_sup = $("#suc3_sup option:selected").text();
        if(suc3_sup == "Others (Specify)")
        {
            $('.suc3_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc3_sup_other_specify').css('display','none');
        }
    });
    /////***SUP 3****////

    /////***SUP 4****////
    $( "#suc4_bat" ).change(function() { 
        var suc4_bat = $("#suc4_bat option:selected").text();
        if(suc4_bat == "Others (Specify)")
        {
            $('.suc4_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc4_bat_other_specify').css('display','none');
        }
    });

    $( "#suc4_int" ).change(function() { 
        var suc4_int = $("#suc4_int option:selected").text();
        if(suc4_int == "Need based referrals (Specify)")
        {
            $('.suc4_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc4_int_other_specify').css('display','none');
        }
    });

    $( "#suc4_adh" ).change(function() { 
        var suc4_adh = $("#suc4_adh option:selected").text();
        if(suc4_adh == "Others (Specify)")
        {
            $('.suc4_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc4_adh_other_specify').css('display','none');
        }
    });

    $( "#suc4_sup" ).change(function() { 
        var suc4_sup = $("#suc4_sup option:selected").text();
        if(suc4_sup == "Others (Specify)")
        {
            $('.suc4_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc4_sup_other_specify').css('display','none');
        }
    });
    /////***SUP 4****////

    /////***SUP 5****////
    $( "#suc5_bat" ).change(function() { 
        var suc5_bat = $("#suc5_bat option:selected").text();
        if(suc5_bat == "Others (Specify)")
        {
            $('.suc5_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc5_bat_other_specify').css('display','none');
        }
    });

    $( "#suc5_int" ).change(function() { 
        var suc5_int = $("#suc5_int option:selected").text();
        if(suc5_int == "Need based referrals (Specify)")
        {
            $('.suc5_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc5_int_other_specify').css('display','none');
        }
    });

    $( "#suc5_adh" ).change(function() { 
        var suc5_adh = $("#suc5_adh option:selected").text();
        if(suc5_adh == "Others (Specify)")
        {
            $('.suc5_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc5_adh_other_specify').css('display','none');
        }
    });

    $( "#suc5_sup" ).change(function() { 
        var suc5_sup = $("#suc5_sup option:selected").text();
        if(suc5_sup == "Others (Specify)")
        {
            $('.suc5_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc5_sup_other_specify').css('display','none');
        }
    });
    /////***SUP 5****////

    /////***SUP 6****////
    $( "#suc6_bat" ).change(function() { 
        var suc6_bat = $("#suc6_bat option:selected").text();
        if(suc6_bat == "Others (Specify)")
        {
            $('.suc6_bat_other_specify').css('display','block');
        }
        else
        {
            $('.suc6_bat_other_specify').css('display','none');
        }
    });

    $( "#suc6_int" ).change(function() { 
        var suc6_int = $("#suc6_int option:selected").text();
        if(suc6_int == "Need based referrals (Specify)")
        {
            $('.suc6_int_other_specify').css('display','block');
        }
        else
        {
            $('.suc6_int_other_specify').css('display','none');
        }
    });

    $( "#suc6_adh" ).change(function() { 
        var suc6_adh = $("#suc6_adh option:selected").text();
        if(suc6_adh == "Others (Specify)")
        {
            $('.suc6_adh_other_specify').css('display','block');
        }
        else
        {
            $('.suc6_adh_other_specify').css('display','none');
        }
    });

    $( "#suc6_sup" ).change(function() { 
        var suc6_sup = $("#suc6_sup option:selected").text();
        if(suc6_sup == "Others (Specify)")
        {
            $('.suc6_sup_other_specify').css('display','block');
        }
        else
        {
            $('.suc6_sup_other_specify').css('display','none');
        }
    });
    /////***SUP 6****////

    $('input[type=radio][name=referred_sacep]').change(function() { 
        var referred_sacep = $(this).val();
        if(referred_sacep == "Yes")
        {
            $('.referred_sacep_type').css('display','block');
        }
        else
        {
            $('.referred_sacep_type').css('display','none');
        }
    });

    $('input[type=radio][name=referred_sacep_type]').change(function() { 
        var referred_sacep_type = $(this).val();
        if(referred_sacep_type == "Others Specify")
        {
            $('.specify_referred_sacep').css('display','block');
        }
        else
        {
            $('.specify_referred_sacep').css('display','none');
        }
    });

    $('input[type=radio][name=eac_final_outcome]').change(function() { 
        var eac_final_outcome = $(this).val();
        if(eac_final_outcome == "Others Specify")
        {
            $('.specify_eac_final_outcome').css('display','block');
        }
        else
        {
            $('.specify_eac_final_outcome').css('display','none');
        }
    });

    $( "#pat_uid" ).change(function() { 
        var pat_uid = $(this).val();
        var linelist_type = 3;
        $.ajax({
            type: "POST",
            url: "<?php echo e(url('checkpatmapdata')); ?>",
            data: {pat_uid:pat_uid,linelist_type:linelist_type, _token: '<?php echo e(csrf_token()); ?>' },
            dataType: "json",
            success: function(res) { 
                var art_centre = res.showdata.art_centre;
                var art_centre_name = res.showdata.art_centre_name;
                var pre_art_reg_num = res.showdata.pre_art_reg_num;
                var art_reg_num = res.showdata.art_reg_num;
                var pat_name = res.showdata.pat_name;
                var pat_age = res.showdata.pat_age;
                var pat_sex = res.showdata.pat_sex;
                var linelist_date = res.showdata.linelist_date;
                var linelist_reason = res.showdata.linelist_reason;
                $('#art_centre').val(art_centre);
                $('#art_centre_name').val(art_centre_name);
                $('#pre_art_reg_num').val(pre_art_reg_num);
                $('#art_reg_num').val(art_reg_num);
                $('#pat_name').val(pat_name);
                $('#pat_age').val(pat_age);
                $('#pat_sex').val(pat_sex);
                $("#linelist_date").val(linelist_date);
                $("#linelist_reason").val(linelist_reason);
                $("#eac_visit").val(1).change();
                $("#eac_visit option").each(function (index) {
                    $(this).prop('disabled', true);
                });
                $("#eac_visit option[value='1']").attr("disabled",false);
                
            },
            error: function (jqXHR, exception) {

            }
        });
    });

    $( "#eac_visit" ).change(function() { 
        var eac_visit = $(this).val();
        if(eac_visit != "")
        {
            if(eac_visit == 1)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.linelist_reason_id_v2').css('display','none');
                $('.suc3').css('display','none');
                $('.linelist_reason_id_v3').css('display','none');
                $('.suc4').css('display','none');
                $('.linelist_reason_id_v4').css('display','none');
                $('.suc5').css('display','none');
                $('.linelist_reason_id_v5').css('display','none');
                $('.suc6').css('display','none');
                $('.linelist_reason_id_v6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 2)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.linelist_reason_id_v3').css('display','none');
                $('.suc4').css('display','none');
                $('.linelist_reason_id_v4').css('display','none');
                $('.suc5').css('display','none');
                $('.linelist_reason_id_v5').css('display','none');
                $('.suc6').css('display','none');
                $('.linelist_reason_id_v6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 3)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','none');
                $('.repeat_viral_load').css('display','none');
                $('.linelist_reason_id_v4').css('display','none');
                $('.suc5').css('display','none');
                $('.linelist_reason_id_v5').css('display','none');
                $('.suc6').css('display','none');
                $('.linelist_reason_id_v6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 4)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.suc5').css('display','none');
                $('.linelist_reason_id_v5').css('display','none');
                $('.suc6').css('display','none');
                $('.linelist_reason_id_v6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 5)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.suc5').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.suc6').css('display','none');
                $('.linelist_reason_id_v6').css('display','none');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else if(eac_visit == 6)
            {
                $('.suc1').css('display','block');
                $('.suc2').css('display','block');
                $('.suc3').css('display','block');
                $('.suc4').css('display','block');
                $('.suc5').css('display','block');
                $('.suc6').css('display','block');
                $('.repeat_viral_load').css('display','block');
                $('.final_outcome').css('display','none');
                $("#final_outcome_date").prop('required',false);
            }
            else
            {
                $('.suc1').css('display','block');
                $('.final_outcome').css('display','block');
                $("#final_outcome_date").attr("required", "true");
                $('.repeat_viral_load').css('display','block');

                var showdata = "<?php echo e($showdata ?? ''); ?>";
                if(showdata != "")
                {
                    var eac_visit = "<?php echo e($showdata[0]->eac_visit ?? ''); ?>";
                    if(eac_visit == 2)
                    {
                        $('.suc2').css('display','block');
                    }
                    else if(eac_visit == 3)
                    {
                        $('.suc3').css('display','block');
                    }
                    else if(eac_visit == 4)
                    {
                        $('.suc4').css('display','block');
                    }
                    else if(eac_visit == 5)
                    {
                        $('.suc5').css('display','block');
                    }
                    else if(eac_visit == 6)
                    {
                        $('.suc6').css('display','block');
                    }
                }
            }
        }
        else
        {
            $('.suc1').css('display','none');
            $('.suc2').css('display','none');
            $('.suc3').css('display','none');
            $('.suc4').css('display','none');
            $('.suc5').css('display','none');
            $('.suc6').css('display','none');
            $('.final_outcome').css('display','none');
        }
    });

    ////***Edit SUP 1***/////
    var suc1_bat = $("#suc1_bat option:selected").text();
    console.log(suc1_bat);
    if(suc1_bat == "Others (Specify)")
    {
        $('.suc1_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc1_bat_other_specify').css('display','none');
    }

    var suc1_int = $("#suc1_int option:selected").text();
    if(suc1_int == "Need based referrals (Specify)")
    {
        $('.suc1_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc1_int_other_specify').css('display','none');
    }

    var suc1_adh = $("#suc1_adh option:selected").text();
    if(suc1_adh == "Others (Specify)")
    {
        $('.suc1_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc1_adh_other_specify').css('display','none');
    }

    var suc1_sup = $("#suc1_sup option:selected").text();
    if(suc1_sup == "Others (Specify)")
    {
        $('.suc1_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc1_sup_other_specify').css('display','none');
    }

    ////***Edit SUP 2***/////
    var suc2_bat = $("#suc2_bat option:selected").text();
    if(suc2_bat == "Others (Specify)")
    {
        $('.suc2_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc2_bat_other_specify').css('display','none');
    }

    var suc2_int = $("#suc2_int option:selected").text();
    if(suc2_int == "Need based referrals (Specify)")
    {
        $('.suc2_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc2_int_other_specify').css('display','none');
    }

    var suc2_adh = $("#suc2_adh option:selected").text();
    if(suc2_adh == "Others (Specify)")
    {
        $('.suc2_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc2_adh_other_specify').css('display','none');
    }

    var suc2_sup = $("#suc2_sup option:selected").text();
    if(suc2_sup == "Others (Specify)")
    {
        $('.suc2_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc2_sup_other_specify').css('display','none');
    }

    ////***Edit SUP 3***/////
    var suc3_bat = $("#suc3_bat option:selected").text();
    console.log(suc3_bat);
    if(suc3_bat == "Others (Specify)")
    {
        $('.suc3_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc3_bat_other_specify').css('display','none');
    }

    var suc3_int = $("#suc3_int option:selected").text();
    console.log(suc3_int);
    if(suc3_int == "Need based referrals (Specify)")
    {
        console.log('ok');
        $('.suc3_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc3_int_other_specify').css('display','none');
    }

    var suc3_adh = $("#suc3_adh option:selected").text();
    if(suc3_adh == "Others (Specify)")
    {
        $('.suc3_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc3_adh_other_specify').css('display','none');
    }

    var suc3_sup = $("#suc3_sup option:selected").text();
    if(suc3_sup == "Others (Specify)")
    {
        $('.suc3_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc3_sup_other_specify').css('display','none');
    }
    ////***Edit SUP 3***/////

    ////***Edit SUP 4***/////
    var suc4_bat = $("#suc4_bat option:selected").text();
    if(suc4_bat == "Others (Specify)")
    {
        $('.suc4_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc4_bat_other_specify').css('display','none');
    }

    var suc4_int = $("#suc4_int option:selected").text();
    if(suc4_int == "Need based referrals (Specify)")
    {
        $('.suc4_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc4_int_other_specify').css('display','none');
    }

    var suc4_adh = $("#suc4_adh option:selected").text();
    if(suc4_adh == "Others (Specify)")
    {
        $('.suc4_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc4_adh_other_specify').css('display','none');
    }

    var suc4_sup = $("#suc4_sup option:selected").text();
    if(suc4_sup == "Others (Specify)")
    {
        $('.suc4_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc4_sup_other_specify').css('display','none');
    }
    ////***Edit SUP 4***/////

    ////***Edit SUP 5***/////
    var suc5_bat = $("#suc5_bat option:selected").text();
    if(suc5_bat == "Others (Specify)")
    {
        $('.suc5_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc5_bat_other_specify').css('display','none');
    }

    var suc5_int = $("#suc5_int option:selected").text();
    if(suc5_int == "Need based referrals (Specify)")
    {
        $('.suc5_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc5_int_other_specify').css('display','none');
    }

    var suc5_adh = $("#suc5_adh option:selected").text();
    if(suc5_adh == "Others (Specify)")
    {
        $('.suc5_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc5_adh_other_specify').css('display','none');
    }

    var suc5_sup = $("#suc5_sup option:selected").text();
    if(suc5_sup == "Others (Specify)")
    {
        $('.suc5_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc5_sup_other_specify').css('display','none');
    }
    ////***Edit SUP 5***/////

    ////***Edit SUP 6***/////
    var suc6_bat = $("#suc6_bat option:selected").text();
    if(suc6_bat == "Others (Specify)")
    {
        $('.suc6_bat_other_specify').css('display','block');
    }
    else
    {
        $('.suc6_bat_other_specify').css('display','none');
    }

    var suc6_int = $("#suc6_int option:selected").text();
    if(suc6_int == "Need based referrals (Specify)")
    {
        $('.suc6_int_other_specify').css('display','block');
    }
    else
    {
        $('.suc6_int_other_specify').css('display','none');
    }

    var suc6_adh = $("#suc6_adh option:selected").text();
    if(suc6_adh == "Others (Specify)")
    {
        $('.suc6_adh_other_specify').css('display','block');
    }
    else
    {
        $('.suc6_adh_other_specify').css('display','none');
    }

    var suc6_sup = $("#suc6_sup option:selected").text();
    if(suc6_sup == "Others (Specify)")
    {
        $('.suc6_sup_other_specify').css('display','block');
    }
    else
    {
        $('.suc6_sup_other_specify').css('display','none');
    }
    ////***Edit SUP 6***/////s
</script>
<?php $__env->startPush('script'); ?>
    <script src="<?php echo e(asset('js/form-components.js')); ?>"></script>
<?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/virutha/treatbuddy.virutha.xyz/resources/views/pages/eac-input.blade.php ENDPATH**/ ?>