<?php $__env->startSection('content'); ?>

<div class="side-title">
    <h3><?php echo e($patient->name); ?></h3>
</div>

<div class="border-item">
    <form class="form-row" >
   <div class="col-12">
       <div class="col-6">
       <label>الكيتو</label>
      
       
            <input type="checkbox" class="checkbox_check" data-id="1" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
       </div>
       <div id="data1" style="display:none">
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>الوقت</th>
                <th>اخر وجبة</th>
                <th>اي وجبة</th>
                <th>KB</th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $ketos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->time_last_meal); ?></td>
                    <td><?php echo e($row->last_meal); ?></td>
                    <td><?php echo e($row->any_food); ?></td>
                    <td><?php echo e($row->kb); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  </div>
   </div>
   
   
   
   <div class="col-12">
       <div  class="col-6">
       <label>الانسولين</label>
           <input type="checkbox" class="checkbox_check" data-id="2" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data2" style="display:none">
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>fasting blood</th>
                <th>fasting insulin</th>
                <th>homa ir</th>
                <th>tg hdl</th>
                <th>hgbaic</th>
                <th>waist circ</th>
                <th>resistance</th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $insulins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->fasting_blood); ?></td>
                    <td><?php echo e($row->fasting_insulin); ?></td>
                    <td><?php echo e($row->homa_ir); ?></td>
                    <td><?php echo e($row->tg_hdl); ?></td>
                    <td><?php echo e($row->hgbaic); ?></td>
                    <td><?php echo e($row->waist_circ); ?></td>
                    <td><?php echo e($row->resistance); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  </div>
   </div>
    
    <div class="col-12">
         <div  class="col-6">
           <label><?php echo e(__('reads.readpatient')); ?></label>
           <input type="checkbox" class="checkbox_check" data-id="3" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
           
 <div id="data3" style="display:none">
           <?php $__currentLoopData = $histories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <table class="table table-bordered table-hover" style="word-break: break-word;text-align:center;">
            <thead>
                
                <th>#</th>
                <th><?php echo e(__('histories.date')); ?></th>
                <th><?php echo e(__('histories.weight')); ?></th>
                <th><?php echo e(__('histories.fat')); ?></th>
                <th><?php echo e(__('histories.muscle')); ?></th>
                <th><?php echo e(__('histories.liquid')); ?></th>
                <th><?php echo e(__('histories.bone')); ?></th>
                <th><?php echo e(__('histories.trust')); ?></th>
                <th><?php echo e(__('histories.sport')); ?></th>
                <th><?php echo e(__('histories.recommend')); ?></th>
                <th><?php echo e(__('histories.complain')); ?></th>
                <th><?php echo e(__('histories.system')); ?></th>
                <th><?php echo e(__('histories.note')); ?></th>
            </thead>
            
            <tbody>
                 
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->date); ?></td>
                    <td><?php echo e($row->weight); ?></td>
                    <td><?php echo e($row->fat); ?></td>
                    <td><?php echo e($row->muscle); ?></td>
                    <td><?php echo e($row->liquid); ?></td>
                    <td><?php echo e($row->bone); ?></td>
                    <td><?php echo e($row->trust); ?></td>
                    <td><?php echo e($row->sport); ?></td>
                    <td><?php echo e($row->recommend); ?></td>
                    <td><?php echo e($row->complain); ?></td>
                    <td><?php echo e($row->system); ?></td>
                    <td><?php echo e($row->note); ?></td>
                    
                </tr>
                
               
            </tbody>
        </table>
           <?php $__currentLoopData = historyreads($row->id); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $his=>$read): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      <div class="row">
            <div class="form-group col-lg-6">
           <label><?php echo e(__('reads.device')); ?> </label>
          
               <input type="text" disabled steps="2" class="form-control"  value="<?php echo e($read->device['name']); ?>" />
            </div>
            <div class="form-group col-lg-6">
           <label><?php echo e(__('reads.number')); ?> </label>
           <input type="number" disabled steps="2" class="form-control"  value="<?php echo e($read['number']); ?>" placeholder="'. __('reads.number').'" />
            </div>
     </div>
            
           
            
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <hr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
  
    </div>
       
        <div class="col-12">
             <div  class="col-6">
       <label>الاكل  </label>
               <input type="checkbox" class="checkbox_check" data-id="4" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data4" style="display:none">
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>الوجبة</th>
                <th>النوع</th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $foods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->name); ?></td>
                    <td><?php if($row->type == '0'): ?> لا يحب <?php else: ?> يحب <?php endif; ?></td>
                    
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  </div>
   </div>
    
    
    
     <div class="col-12">
           <div  class="col-6">
       <label>الاكل اخر ٢٤ ساعة</label>
                 <input type="checkbox" class="checkbox_check" data-id="5" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
       
 <div id="data5" style="display:none">
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>الوصف</th>
                
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $lastfoods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->description); ?></td>
                   
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
   </div>
   
   </div>
    
    
    <div class="col-12">
        <div  class="col-6">
       <label>الجلسات</label>
               <input type="checkbox" class="checkbox_check" data-id="6" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data6" style="display:none">
  
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>المنطقة</th>
                <th>تم الدفع</th>
                <th>المتبقي</th>
                <th>التكنكال</th>
                <th>الطبيب</th>
                <th>الجهاز</th>
                <th>قبل</th>
                <th>بعد</th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $sessions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->area); ?></td>
                    <td><?php echo e($row->paid); ?></td>
                    <td><?php echo e($row->remain); ?></td>
                    <td><?php echo e($row->technical->name); ?></td>
                    <td><?php echo e($row->doctor->name); ?></td>
                    <td><?php echo e($row->machine->name); ?></td>
                    <td><?php echo e($row->beforing); ?></td>
                    <td><?php echo e($row->aftering); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  
   </div>
   </div>
    
     <div class="col-12">
           <div  class="col-6">
       <label>التحاليل</label>
       
               <input type="checkbox" class="checkbox_check" data-id="7" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data7" style="display:none">
       <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th>التاريخ</th>
                <th>الوصف</th>
                <th>السعر</th>
                <th>النوع</th>
                <th>التحليل</th>
                <th>النتيجة</th>
                
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $anatomies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->dating); ?></td>
                    <td><?php echo e($row->description); ?></td>
                    <td><?php echo e($row->cost); ?></td>
                    <td><?php echo e($row->category->name); ?></td>
                    <td><?php echo e($row->anatomy->name); ?></td>
                    <td><?php echo e($row->result); ?></td>
                   
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  
   </div>
   </div>
   <div class="col-12">
         <div  class="col-6">
          <label>الحجوزات الطبية</label>
              <input type="checkbox" class="checkbox_check" data-id="8" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data8" style="display:none">
          <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th><?php echo e(__('reservations.branch')); ?></th>
                <th><?php echo e(__('reservations.doctor')); ?></th>
                <th><?php echo e(__('reservations.count')); ?></th>
                <th><?php echo e(__('reservations.remain')); ?></th>
                <th><?php echo e(__('reservations.expired')); ?></th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $reservation; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->branch->name); ?></td>
                    <td><?php echo e($row->doctor->name); ?></td>
                    <td><?php echo e($row->count); ?></td>
                    <td><?php echo e($row->count - remain($row->id)); ?></td>
                    <td><?php if($row->expired == '1'): ?> <?php echo e(__('reservations.notcontinue')); ?> <?php else: ?> <?php echo e(__('reservations.remain')); ?> <?php endif; ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  
        
       
   </div>
    
    <div class="col-12">
        <div  class="col-6">
        
          <label>الحجوزات الرياضية</label>
             <input type="checkbox" class="checkbox_check" data-id="9" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data9" style="display:none">
          <table class="table table-bordered table-hover" style="text-align:center">
            <thead>
                
                <th>#</th>
                <th><?php echo e(__('reservations.branch')); ?></th>
                <th><?php echo e(__('reservations.doctor')); ?></th>
                <th><?php echo e(__('reservations.count')); ?></th>
                <th><?php echo e(__('reservations.remain')); ?></th>
                <th><?php echo e(__('reservations.expired')); ?></th>
            </thead>
            
            <tbody>
                 <?php $__currentLoopData = $reservations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key+1); ?></td>
                    <td><?php echo e($row->branch->name); ?></td>
                    <td><?php echo e($row->trainner->name); ?></td>
                    <td><?php echo e($row->count); ?></td>
                    <td><?php echo e($row->count - remain($row->id)); ?></td>
                    <td><?php if($row->expired == '1'): ?> <?php echo e(__('reservations.notcontinue')); ?> <?php else: ?> <?php echo e(__('reservations.remain')); ?> <?php endif; ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               
            </tbody>
        </table>
  
     
   </div>   
     
   </div>
    
     <div class="col-12">
          <div  class="col-6">
       <label>النظام الغذائي </label>
                 <input type="checkbox" class="checkbox_check" data-id="10" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data10" style="display:none">
       
          <?php if(!is_null($systemfood)): ?>
          <div class="row">
               <div class="row">
                     <div class="form-group col-lg-6" >
             <label><?php echo e(__('reservations.system_food_id')); ?> </label>
             <input type="text" class="form-control" disabled  value="<?php echo e($systemfood->systemfood->name); ?>">
        </div>
              <div class="form-group col-lg-6" >
             <label>التصنيفات </label>
             <input type="text" class="form-control" disabled value="<?php echo e($systemfood->category->name); ?>">
        </div>
        <div class="form-group col-lg-6" >
             <label>السعرات </label>
             <input type="text" class="form-control" disabled value="<?php echo e($systemfood->calorie->name); ?>">
        </div>
        <div class="form-group col-lg-6" >
             <label>الاكواد </label>
             <input type="text" class="form-control" disabled value="<?php echo e($systemfood->code->name); ?>">
        </div>
          <div class="form-group col-lg-12" >
            <label>الوجبة </label>
                <textarea disabled class="form-control my-editor"><?php echo e(reservationmeal($systemfood->id)); ?></textarea>
       </div>
          </div>
  
        
     
   </div>
   <?php else: ?>
   <div class="col-12">لا يوجد تظام غذائي</div>
   <?php endif; ?>
   
   </div>
   </div>
    <div class="col-12">
        <div  class="col-6">
          <label>النظام الرياضي</label>
            <input type="checkbox" class="checkbox_check" data-id="11" onclick="showdata(this)" style="
    margin-top: 3pc;
    margin-right: 4pc;
"> عرض واخفاء 
</div>
 <div id="data11" style="display:none">
       
           <?php if(!is_null($systemphysic)): ?>
          <div class="row">
              <div class="form-group col-lg-6" >
             <label><?php echo e(__('foods.type')); ?> </label>
             <input type="text" class="form-control" disabled  value="<?php echo e($systemphysic->system_physic->name); ?>">
        </div>
        
              <div class="form-group col-lg-6" >
             <label>الكود </label>
             <input type="text" class="form-control" disabled  value="<?php echo e($systemphysic->code->name); ?>">
        </div>
         <?php $__currentLoopData = physicsuser($systemphysic->id); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows=>$physic): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="row col-12 pricing-list-item border-item mb-4" >
        
           
             <div class="form-group col-lg-6">
           <label><?php echo e(__('foods.type')); ?> </label>
            <input type="text" class="form-control" disabled  value="<?php echo e($physic->physcal->name); ?>">
            
            </div>
              <div class="form-group col-lg-6">
            <label>العدد </label>
            <input type="number" class="form-control" disabled  placeholder="العدد" value='<?php echo e($physic->num); ?>'/>
        </div>
        

      
             </div>
           
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            
          </div>
          <?php else: ?>
   <div class="col-12">لا يوجد تظام الرياضي</div>
   <?php endif; ?>
  
     
   </div>
       
     
   </div>
    
    
    
    </form>
</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS files -->
   <script src="<?php echo e(asset('/assets/admin/js/lib/tinymce.min.js')); ?>"></script>
           
    <script>
    function showdata(elem){
        let data = $(elem).attr('data-id');
        if ($(elem).is(':checked')) {
            $('#data'+data).css('display','block');
        }
        else{
            
            $('#data'+data).css('display','none');
        }
    } 
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            imagePath = "<?php echo e(asset('')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/admin/js/editor.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/lfm.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/green_apple/resources/views/admin/patients/show.blade.php ENDPATH**/ ?>