 <div class="aw_xblue">
                            <table class="table table-bordered table-hover table-striped nopdngtbl" style="direction: rtl;margin: 5px 0px;">
                                    <tr>
                                        <td class="txtr"  {if $simpleView == 1}style="font-size: 18px;" {/if}>{if !empty($patientdata.wifetype)}{$patientdata.wifetype} {/if}/ {$patientdata.wifename}</td>
                                        <td class="txtr">{if $patientdata->new_dateofbirth_calc != ''} {$patientdata->new_dateofbirth_calc} سنة {/if}  </td>
                                        <td class="txtr">{if !empty($patientdata.wifejob)}{$patientdata.wifejob}{/if}</td>
                                        <td class="txtr">{$patientdata.address}</td>
                                        <td class="txtr wds15">رقم {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if} : {$patientdata.statusno}</td>
                                        {if $patientdata.statuesid == 4 || $patientdata.statuesid == 3}<td colspan="4" class="wds15"></td>{/if}
                                    </tr>
                                    <tr>
                                        {if $patientdata->statuesid != 1}
                                        {if $patientdata->mirragefromdate}

                                        {if $patientdata->statuesid == 4}
                                        <td class="txtr">{$wifeStatus} منذ  &nbsp; &nbsp; &nbsp;
                                            {else} <td class="txtr">{$wifeStatus} منذ &nbsp; &nbsp; &nbsp; &nbsp;
                                            {/if}
                                            {if $mirragemonths == 0} {$mirrageyears}&nbsp; سنة
                                            {elseif $mirrageyears==0 } {if $mirragemonths==1}{$mirragemonths} شهر {else}{$mirragemonths} شهور {/if}
                                            {else } {$mirragemonths} : {$mirrageyears}&nbsp;     سنة
                                            {/if}
                                        </td>
                                        {else}
                                        {if $patientdata->statuesid == 4}<td class="txtr">{$wifeStatus} منذ &nbsp; &nbsp; &nbsp;  {else} <td class="txtr">{$wifeStatus} منذ :  {/if}

                                            {/if}
                                        <td class="txtr"> الذكور: {$patientdata.boyson} </td>
                                        <td class="txtr"> الإناث: {$patientdata.girlson} </td>
                                        {/if}
                                        <td class="txtr" style=" direction: ltr; "> <a href="#" id="patientsBMI" data-bmi="{$exmination->bmi}" data-WT="{$exmination->weight}"  data-HT="{$exmination->height}" data-id="{$exmination->id}">BMI : {$exmination->bmi}</a>  </td>
                                        <td class="txtr" colspan="2"> <a href="#" class="patientsfile"> </a>  </td>
                                        {if $patientdata.statuesid == 1 ||  $patientdata.statuesid == 4 || $patientdata.statuesid == 3}

                                        {if $patient_doctor == 1}
                                        <td class="txtr">الطبيب المعالج     : {$patient_doctor_name}</td>
                                        {/if}

                                        {if $hospitalView == 1}
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="2">
                                            <a class="a_edit" target="_blank" href="{$hosturl}/controllers/patients.php?ac=edit&id={$patientid}">
                                                تعديل بيانات {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if}</a>
                                        </td>
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit"  href="{$hosturl}/controllers/patients.php?ac=showendvisits&patientid={$patientid}">
                                                تقرير خروج</a>
                                        </td>
                                        {else}
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="3">
                                            <a class="a_edit" target="_blank" href="{$hosturl}/controllers/patients.php?ac=edit&id={$patientid}">
                                                تعديل بيانات {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if}</a>
                                        </td>
                                        {/if}

                                        {/if}
                                    </tr>
                                    {if $patientdata.statuesid != 1 &&  $patientdata.statuesid != 4 && $patientdata.statuesid != 3}
                                    <tr>
                                        <td class="txtr" {if $simpleView == 1}style="font-size: 18px;" {/if} >{if !empty($patientdata.husbandtype)}{$patientdata.husbandtype} {/if}/ {$patientdata.husdandname}</td>
                                        <td class="txtr">{if  $patientdata.statuesid != 3 }{if $new_dateofbirth_husband != '' } {$new_dateofbirth_husband} سنة {/if} {/if}</td>
                                        <td class="txtr">{if !empty($patientdata.husbandjob)}{$patientdata.husbandjob} {/if}</td>

                                        {if $patient_doctor == 1}
                                        <td class="txtr">الطبيب المعالج     : {$patient_doctor_name}</td>
                                        {/if}

                                        {if $hospitalView == 1}
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit" target="_blank" href="{$hosturl}/controllers/patients.php?ac=edit&id={$patientid}">
                                                تعديل بيانات {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if}</a>
                                        </td>
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit"  href="{$hosturl}/controllers/patients.php?ac=showendvisits&patientid={$patientid}">
                                                تقرير خروج</a>
                                        </td>
                                        {else}
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="2">
                                            <a class="a_edit" target="_blank" href="{$hosturl}/controllers/patients.php?ac=edit&id={$patientid}">
                                                تعديل بيانات {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if}</a>
                                        </td>
                                        {/if}

                                    </tr>
                                    {/if}
                                </table>
                            </div>
<!-- https://ufile.io/nnh2wihn -->
<style type="text/css">
   .yellow{
   background: yellow;
   }
   .red{
   background: #d40404;
   color: #fff
   }
   h2{
   text-align: center;
   }
   hr{
   margin: 10px 40%;
   border: 1px solid;
   }
   .toggle{
   font-weight: 800;max-width: 130px;
   }
   .rowtoggle{
   padding-bottom: 10px;
   }
   .thhead{
   background: #fff !important;
   color: red !important
   }
   .addappend{
   color: red;
   }
   .colorred{
   color: red;
   font-size: 14px
   }
   .hr{
   margin: 20px 17%;
   border: 1px dotted;
   }
   .tdcolor{
   background: #aaa; border: 1px solid #000 !important;
   }
   td,th{
   border: 1px solid #000 !important;text-align: center !important; 
   }
   input{
   border: none !important;
   }
   table{
   width: 100% !important;
   padding: 0px 20px;
   }
   .hidetable{
      display: none;
   }
</style>
<div class="page-content-wrapper">                   
                     <div class="form-body">
                        <h2 style="font-weight: bold"> Infertility visits</h2>
                        <hr>
                        <h2 style="font-weight: bold"> husband</h2>
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <td width="10%" class="red">Diagnosis</td>
                                 <td width="30%">
                                    {foreach $infertility->husbndiagnosis1t as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                              </tr>
                              <tr>
                                 <td width="10%" class="red">Evaluation</td>
                                 <td width="30%">
                                      {$ivfsheet->anevaluation} 
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" data-show="history" >History</a>
                        </div>
                        <table class="table table-bordered hidetable history" >
                           <tbody>
                              <tr>
                                 <th colspan="2" width="15%">Travel abroad</th>
                                 <td colspan="1" width="10%">Location</td>
                                 <td colspan="1" width="25%">
                                     {$infertility->sheetlocationt->title}
                                 </td>
                                 <th colspan="1" width="10%" >Duration</th>
                                 <td colspan="1" width="10%"> {$infertility->historyduration}</td>
                                 <th colspan="1" width="5%">In</th>
                                 <td colspan="1" width="10%">{$infertility->historyin}</td>
                                 <th colspan="1" width="5%">Out</th>
                                 <td colspan="1" width="10%">{$infertility->historyout}</td>
                              </tr>
                              <tr>
                                 <th  colspan="4">Medical History</th>
                                 <th  colspan="6">Surgical History</th>
                              </tr>
                              <tr>
                                 <td colspan="3">
                                    {foreach $infertility->medicalhistorydmt as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                                 <td  colspan="1">  {$infertility->medicalhistorynote}</td>
                                 <td  colspan="4">
                                   {foreach $infertility->surgicalhistorydmt as $single}
                                      {$single->title} /
                                    {/foreach}
                                    
                                 </td>
                                 <td colspan="2"> {$infertility->surgicalhistorynote}</td>
                              </tr>
                           </tbody>
                        </table>
                         <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" data-show="examination" >Examination</a>
                        </div>
                        <table class="table table-bordered hidetable examination" width="100%">
                           <tbody>
                              <tr>
                                 <th  width="50%">General (BW)</th>
                                 <th  width="50%" colspan="2">Local</th>
                              </tr>
                              <tr>
                                 <td width="40%">{$infertility->examinationgeneral}</td>
                                 <td width="40%">
                                     {foreach $infertility->examinationlocalset as $single}
                                      {$single->title} /
                                    {/foreach} 
                                 </td>
                                 <td width="20%"> {$infertility->examinationlocalnote}</td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle"  data-show="investigations" >Investigations</a>
                        </div>
                        {if !empty($semen)}
                        <table class="table table-bordered hidetable investigations">
                           <tbody id="semen">
                              <tr>
                                 <th scope="row" class="thhead" colspan="15">
                                    <a  data-add="semen" data-id="{$id}"  data-table="infertilitysheetid">Semen</a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="2">Date</th>
                                 <th  colspan="2">PLace</th>
                                 <th  colspan="2">Type</th>
                                 <th  colspan="1">C</th>
                                 <th  colspan="1">PRM</th>
                                 <th  colspan="1">TM</th>
                                 <th  colspan="1">AF</th>
                                 <th  colspan="1">VIT</th>
                                 <th  colspan="1">Vol</th>
                                 <th  colspan="1">TZI</th>
                                 <th  colspan="1">SDI</th>
                                 <th  colspan="1"></th>
                              </tr>

                              {foreach $semen as $single}
                              <tr class="rowsemen{$single->id}">
                                 <td colspan="2" width="8%">{$single->date}</td>
                                 <td colspan="2" width="20%">{$single->semenplacet->title}</td>
                                 <td colspan="2" width="20%">{$single->sementypet->title}</td>
                                 <td >{$single->nc}</td>
                                 <td >{$single->prm}</td>
                                 <td >{$single->tm}</td>
                                 <td >{$single->af}</td>
                                 <td >{$single->vit}</td>
                                 <td >{$single->vol}</td>
                                 <td >{$single->tzi}</td>
                                 <td >{$single->sdi}</td>
                                  <td>
                                     
                                 </td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($semen2)}
                        <table class="table table-bordered hidetable investigations" >
                           <tbody id="semen2">
                              <tr>
                                 <th scope="row" class="thhead" colspan="15">
                                    <a  data-add="semen2" data-id="{$id}"  data-table="infertilitysheetid">Other Inv</a>
                                 </th>
                              </tr>
                              <tr>
                                 <td width="5%"></td>
                                 <td  width="10%" class="colorred">Scrotal U/S</td>
                                 <td width="10%"class="colorred">TRUS</td>
                                 <td width="10%"class="colorred">Karyo</td>
                                 <td width="10%"class="colorred">Yq micro</td>
                                 <td width="10%"class="colorred">SDF</td>
                                 <td width="25%"class="colorred">Semen Fr</td>
                                 <td width="10%"class="colorred">TESE</td>
                                 <td width="10%"class="colorred">Other</td>
                                 <td width="10%"class="colorred"></td>
                              </tr>
                               {foreach $semen2 as $single}
                              <tr class="rowsemen2{$single->id}">
                                 <th  >Date</th>
                                 <td >{$single->detescrotal}</td>
                                 <td >{$single->detetrue}</td>
                                 <td >{$single->detekaryo}</td>
                                 <td >{$single->deteyqmicro}</td>
                                 <td >{$single->detesdf}</td>
                                 <td >{$single->detesemenfr}</td>
                                 <td >{$single->detetese}</td>
                                 <td >{$single->deteother}</td>
                                  <td>
                                     
                                 </td>
                              </tr>
                              <tr class="rowsemen2{$single->id}">
                                 <th  >PLace</th>
                                 <td >{$single->placescrotal}</td>
                                 <td >{$single->placetrue}</td>
                                 <td >{$single->placekaryo}</td>
                                 <td >{$single->placeyqmicro}</td>
                                 <td >{$single->placesdf}</td>
                                 <td >
                                    {$single->semen2placesemenfrt->title}
                                 </td>
                                 <td >
                                    {$single->semen2placeteset->title}
                                 </td>
                                 <td >{$single->placeother}</td>
                                 <td>
                                    
                                 </td>
                              </tr>
                              <tr class="rowsemen2{$single->id}">
                                 <th scope="row" >Result</th>
                                 <td >
                                    {foreach $single->semen2resultscrotalt as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                 <td >
                                    {$single->semen2resulttruet->title}
                                 </td>
                                 <td >
                                    {$single->semen2resultkaryot->title}
                                 </td>
                                 <td >
                                    {$single->semen2resultyqmicrot->title}
                                 </td>
                                 <td >
                                    {$single->semen2resultsdft->title}
                                 </td>
                                 <td  style="padding: 0px;">
                                    <table class="table table-bordered" style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <th>C</th>
                                          <th>M</th>
                                          <th>AF</th>
                                       </tr>
                                       <tr>
                                          <td >{$single->resultsemenfrc}</td>
                                          <td >{$single->resultsemenfrm}</td>
                                          <td >{$single->resultsemenfraf}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td >{$single->resulttese}</td>
                                 <td >{$single->resultother}</td>
                                 <td>
                                    
                                 </td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($hormonalprofile)}
                       <table class="table table-bordered hidetable investigations" >
                           <tbody id="hormonalprofile">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="hormonalprofile" data-id="{$id}"  data-table="infertilitysheetid">Hormonal Profile  </a>
                                 </th>
                              </tr>
                              <tr>
                                 <td ></td>
                                 <td class="colorred">FSH</td>
                                 <td class="colorred">LH</td>
                                 <td class="colorred">TT</td>
                                 <td class="colorred">PRL</td>
                                 <td class="colorred">E2</td>
                                 <td class="colorred">Inhibin B</td>
                                 <td class="colorred">Other</td>
                                 <td class="colorred">Other</td>
                                 <td class="colorred"></td>
                              </tr>
                              {foreach $hormonalprofile as $single}
                              <tr class="rowhormonalprofile{$single->id}">
                                 <th scope="row" >Date</th>
                                 <td >{$single->datefsh}</td>
                                 <td >{$single->datelh}</td>
                                 <td >{$single->datett}</td>
                                 <td >{$single->dateprl}</td>
                                 <td >{$single->datee2}</td>
                                 <td >{$single->dateinhibin}</td>
                                 <td >{$single->dateother}</td>
                                 <td >{$single->dateother1}</td>
                                  <td>
                                     
                                 </td>
                              </tr>
                              <tr class="rowhormonalprofile{$single->id}">
                                 <th scope="row" >Result</th>
                                 <td >{$single->resultfsh}</td>
                                 <td >{$single->resultlh}</td>
                                 <td >{$single->resulttt}</td>
                                 <td >{$single->resultprl}</td>
                                 <td >{$single->resulte2}</td>
                                 <td >{$single->resultinhibin}</td>
                                 <td >{$single->resultother}</td>
                                 <td >{$single->resultother1}</td>
                                 <td></td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                         {if !empty($infertility->sheetttt)}        
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th class="red">TTT</th>
                                 <td  >{$infertility->sheetttt}</td>
                              </tr>
                           </tbody>
                        </table>
                        {/if}
                        <hr class="hr" >
                        <h2 style="font-weight: bold"> WIFE </h2>
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th width="15%"  class="red">Diagnosis</th>
                                 <td  >
                                     {foreach $infertility->diagnosist as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                              </tr>
                              <tr>
                                 <td width="15%" class="red">Evaluation</td>
                                 <td >
                                      {$ivfsheet->anevaluations} 
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" data-show="history2" >History</a>
                        </div>
                        {if !empty($infertility->sheetttt)}  
                        <table class="table table-bordered hidetable history2" >
                           <tbody>
                              <tr>
                                 <td colspan="5" width="80%" class="tdcolor">Menstrual History</td>
                                 <td colspan="1" class="tdcolor">Sexual History</td>
                              </tr>
                              <tr>
                                 <td colspan="5"  style="padding: 0px;">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >Reg</td>
                                          <td >C/D</td>
                                          <td >Amount</td>
                                          <td >Dysm</td>
                                          <td >LMP</td>
                                       </tr>
                                       <tr>
                                          <td >
                                             {$infertility->menstrualregt->title}
                                             </td>
                                          <td width="15%">{$infertility->wmenstrualcd}</td>
                                          <td >
                                             {$infertility->menstrualamountt->title}
                                          </td>
                                          <td >
                                             {$infertility->menstrualdysmt->title}
                                            
                                          </td>
                                          <td width="10%">{$infertility->wmenstruallmp}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td colspan="1">{$infertility->wsexual}</td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="table table-bordered hidetable history2" >
                           <tbody>
                              <tr>
                                 <td  colspan="2" class="tdcolor"> Medical History</td>
                                 <td  colspan="2" class="tdcolor">Surgical History </td>
                                 <td  colspan="2" class="tdcolor">Family History</td>
                              </tr>
                              <tr>
                                 <td  colspan="1" style="max-width: 30px">
                                    {foreach $infertility->medicalhistoryt as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                                 <td  colspan="1" width="10%">{$infertility->w2medical}</td>
                                 <td  colspan="1" style="max-width: 30px">
                                    {foreach $infertility->surgicalhistoryt as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                                 <td  colspan="1" width="10%"> {$infertility->wsurgical}</td>
                                 <td  colspan="1" style="max-width: 30px">
                                   {foreach $infertility->familyhistoryt as $single}
                                      {$single->title} /
                                    {/foreach} 
                                 </td>
                                 <td  colspan="1" width="10%"> {$infertility->wfamily}</td>
                              </tr>
                           </tbody>
                        </table>
                        {/if}
                         <div id="hysteroscopy2"></div>

                         {if !empty($awifep)}  
                        <table class="table table-bordered  hidetable history2" >
                           <tbody id="awifep">
                              <tr>
                                 <th scope="row" class="thhead" colspan="12">
                                    <a  data-add="awifep" data-id="{$id}"  data-table="infertilitysheetid">(Obst History) p</a>
                                 </th>
                              </tr>
                              <tr>
                                 <td colspan="1" width="10%">Sex</td>
                                 <td colspan="1" width="5%">Name</td>
                                 <td colspan="1" width="10%">Date of D</td>
                                 <td colspan="1" width="5%">Age</td>
                                 <td colspan="1" width="10%">Mode of D</td>
                                 <td colspan="1" width="10%">Type of D</td>
                                 <td colspan="1" width="5%">W</td>
                                 <td colspan="1" width="5%">L</td>
                                 <td colspan="1" width="10%">Obst</td>
                                 <td colspan="1" width="25%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td colspan="3">CO</td>
                                       </tr>
                                       <tr>
                                          <td colspan="1" width="33%">Method</td>
                                          <td colspan="1" width="33%">Duration</td>
                                          <td colspan="1" width="33%">Stopped</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  colspan="1" width="5%">Comment</td>
                                  <td colspan="1" width="5%"></td>
                              </tr>
                              {foreach $awifep as $single}
                               <tr class="rowawifep{$single->id}">   
                                 <td  width="10%">
                                    {$single->wifesext->title}
                                    
                                 </td>
                                 <td width="5%">{$single->name}</td>


                                 <td width="10%">{$single->date}</td>


                                 <td width="5%" >{$single->wifeage}</td>
                                 <td  width="10%">
                                    {$single->wifemodeofdt->title}
                                     
                                 </td>
                                 <td   width="10%">
                                    {$single->wifetypeofdt->title}
                                    
                                 </td>
                                 <td  width="5%" >
                                    {$single->wifew}
                                 </td>
                                 <td  width="5%" >
                                    <input type="checkbox"  class="form-control checkbox" {if $single->wifel == 1} checked {/if}>
                                 </td>
                                 <td  width="10%" style="width: 30px">
                                    {foreach $single->wifeobstt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                  
                                 </td>
                                 <td width="25%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td  width="33%" style="max-width: 33px">
                                             {foreach $single->awifepmethodt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                             
                                          </td>
                                          <td width="33%">{$single->duration}</td>
                                          <td width="33%">{$single->stopped}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td width="5%">{$single->comment}</td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($wifeepc)}  
                        <table class="table table-bordered hidetable history2" >
                           <tbody id="wifeepc">
                              <tr>
                                 <td colspan="7" style="background:#fff"  width="80%" class="tdcolor">
                                    <a  data-add="wifeepc" style="color: red" data-id="{$id}"  data-table="infertilitysheetid" >EPC</a></td>
                                 <td colspan="3" style="background:#fff" class="tdcolor">Last</td>
                              </tr>
                              <tr>
                                    <td >date</td>
                                    <td >Type</td>
                                    <td >W</td>
                                    <td >TTT</td>
                                    <td >Obst</td>
                                    <td >Histopath</td>
                                    <td >cost</td>
                                    <td >D</td>
                                    <td >A</td>
                                    <td ></td>
                              </tr>
                              {foreach $wifeepc as $single}
                              <tr class="rowwifeepc{$single->id}">  
                                    <td width="10%">{$single->wifeepcdate}</td>
                                    <td >
                                       {$single->wifeepctypet->title}
                                       
                                    </td>
                                    <td width="10%">{$single->wifeepcw}</td>
                                    <td >
                                       {$single->wifeepctttt->title}
                                       
                                    </td>
                                    <td >
                                       {$single->wifeepcobstt->title}
                                       
                                    </td>
                                    <td width="10%">{$single->histopath}</td>
                                    <td width="10%">{$single->coast}</td>
                                    <td >{$single->wifeepcp}</td>
                                    <td >{$single->wifeepcepc}</td>
                                    <td width="5%">
                                     
                                 </td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" data-show="Examination2" >Examination</a>
                        </div>
                        <table class="table table-bordered hidetable Examination2">
                           <tbody>
                              <tr>
                                 <td  colspan="2" class="tdcolor">  General </td>
                                 <td  colspan="2" class="tdcolor"> Local </td>
                              </tr>
                              <tr>
                                 <td  colspan="1" width="10%"> BW</td>
                                 <td  colspan="1"> {$infertilitysheet->generalbw}</td>
                                 <td  colspan="1" width="10%">Vulva</td>
                                 <td  colspan="1" style="max-width: 33px">
                                    {foreach $infertility->localvulvat as $single}
                                      {$single->title} /
                                    {/foreach}
                                    
                                 </td>
                              </tr>
                              <tr>
                                 <td  colspan="1" width="10%">BMI </td>
                                 <td  colspan="1"> {$infertilitysheet->generalbmi}</td>
                                 <td  colspan="1" width="10%">Vagina</td>
                                 <td  colspan="1" style="max-width: 33px">
                                    {foreach $infertility->localvaginat as $single}
                                      {$single->title} /
                                    {/foreach}
                                  
                                 </td>
                              </tr>
                              <tr>
                                 <td  colspan="1" width="10%"> Breast</td>
                                 <td  colspan="1">
                                    {foreach $infertility->generalbreastt as $single}
                                      {$single->title} /
                                    {/foreach}
                                   
                                 </td>
                                 <td  colspan="1" width="10%">CX</td>
                                 <td  colspan="1" style="max-width: 33px">
                                    {foreach $infertility->localcxt as $single}
                                      {$single->title} /
                                    {/foreach}
                                   
                                 </td>
                              </tr>
                              <tr>
                                 <td  colspan="1" width="10%">Hirsutism </td>
                                 <td  colspan="1">
                                   {$infertility->generalhirsutismt->title}
                                   
                                 </td>
                                 <td  colspan="1" width="10%">Other</td>
                                 <td  colspan="1"> {$infertilitysheet->localother}</td>
                              </tr>
                              <tr>
                                 <td  colspan="1" width="10%"> Thyroid</td>
                                 <td  colspan="1">
                                    {$infertility->generalthyroidt->title}
                                  
                                 </td>
                                 <td  colspan="1" width="10%">Other</td>
                                 <td  colspan="1"> {$infertilitysheet->localother1}</td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle " data-show="investigations2" >Investigations</a>
                        </div>
                        {if !empty($hormonalprofile2)}  
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="hormonalprofile2">
                              <tr>
                                 <th scope="row" class="thhead" colspan="15">
                                    <a  data-add="hormonalprofile2" data-id="{$id}"  data-table="infertilitysheetid">Hormonal Profile  </a>
                                 </th>
                              </tr>
                              <tr>
                                 <td ></td>
                                 <td class="colorred">AMH</td>
                                 <td class="colorred">TSH</td>
                                 <td class="colorred">PRL</td>
                                 <td class="colorred">FSH</td>
                                 <td class="colorred">LH</td>
                                 <td class="colorred">E2</td>
                                 <td class="colorred">P4</td>
                                 <td class="colorred">Other</td>
                                  <td class="colorred"></td>
                              </tr>
                               {foreach $hormonalprofile2 as $single}
                              <tr class="rowhormonalprofile2{$single->id}">
                                 <th scope="row" >Date</th>
                                 <td >{$single->dateamh}</td>
                                 <td >{$single->datetsh}</td>
                                 <td >{$single->dateprl}
                                 <td >{$single->datefsh}
                                 <td >{$single->datelh}</td>
                                 <td >{$single->datee2}</td>
                                 <td >{$single->datep4}</td>
                                 <td >{$single->dateother}</td>
                                 <td>
                                     
                                 </td>
                              </tr>
                              <tr class="rowhormonalprofile2{$single->id}">
                                 <th scope="row" >Result</th>
                                 <td >{$single->resultamh}</td>
                                 <td >{$single->resulttsh}</td>
                                 <td >{$single->resultprl}</td>
                                 <td >{$single->resultfsh}</td>
                                 <td >{$single->resultlh}</td>
                                 <td >{$single->resulte2}</td>
                                 <td >{$single->resultp4}</td>
                                 <td >{$single->resultother}</td>
                                 <td></td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($tvs)}  
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="tvs">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="tvs" data-id="{$id}"  data-table="infertilitysheetid">TVS</a>
                                 </th>
                              </tr>
                               {foreach $tvs as $single}
                             <tr class="rowtvs{$single->id}">   
                                 <th width="15%" >Date</th>
                                 <td >{$single->comment}</td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                               <tr class="rowtvs{$single->id}"> 
                                 <th width="15%" >UT</th>
                                 <td >
                                    {foreach $single->tvsutt as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                  <td></td>
                              </tr>
                               <tr class="rowtvs{$single->id}"> 
                                 <th width="15%" >CX</th>
                                 <td >
                                   {foreach $single->tvscxt as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                  <td></td>
                              </tr>
                               <tr class="rowtvs{$single->id}"> 
                                 <th width="15%" >RO</th>
                                 <td >
                                   {foreach $single->tvsrot as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                  <td></td>
                              </tr>
                               <tr class="rowtvs{$single->id}"> 
                                 <th width="15%" >LO</th>
                                 <td >
                                    {foreach $single->tvslot as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                  <td></td>
                              </tr>
                               <tr class="rowtvs{$single->id}"> 
                                 <th width="15%" >Pelvis</th>
                                 <td >
                                    {foreach $single->tvspelvist as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                 </td>
                                 <td></td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($dtvs)}  
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="dtvs">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="dtvs" data-id="{$id}"  data-table="infertilitysheetid" >3D TVS </a>
                                 </th>
                              </tr>
                              <tr>
                                 <th width="15%" >Date</th>
                                 <th width="15%" >Place</th>
                                 <th  >Result</th>
                                 <th  ></th>
                              </tr>
                               {foreach $dtvs as $single}
                             <tr class="rowdtvs{$single->id}">
                                 <td >{$single->date}</td>
                                 <td  >
                                    {foreach $single->dtvsplacet as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                   
                                 </td>
                                 <td  >
                                    {foreach $single->dtvsresultt as $single2}
                                      {$single2->title} /
                                    {/foreach}
                                    
                                 </td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($sis)} 
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="sis">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="sis" data-id="{$id}"  data-table="infertilitysheetid">SIS </a>
                                 </th>
                              </tr>
                              <tr>
                                 <th width="15%" >Date</th>
                                 <th  >Result</th>
                                 <th  ></th>
                              </tr>
                               {foreach $sis as $single}
                               <tr class="rowsis{$single->id}">
                                 <td >{$single->date}</td>
                                 <td >{foreach $single->sisresultt as $single2}
                                      {$single2->title} /
                                    {/foreach} 


                                 </td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($hsg)} 
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="hsg">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="hsg" data-id="{$id}"  data-table="infertilitysheetid">HSG</a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">PLace</th>
                                 <th  colspan="1">UT</th>
                                 <th  colspan="1">RT</th>
                                 <th  colspan="1">LT</th>
                                 <th  colspan="1">Pelvis</th>
                                 <th  colspan="1"></th>
                              </tr>
                               {foreach $hsg as $single}
                              <tr class="rowhsg{$single->id}">
                                 <td width="14%">{$single->date}</td>
                                 <td  width="14%">
                                    {$single->hsgplacet->title}
                                    
                                 </td>
                                 <td  width="16%">
                                    {$single->hsgutt->title}
                                     
                                 </td>
                                 <td  width="20%">
                                    {foreach $single->hsgrtt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                     
                                 </td>
                                 <td  width="20%">
                                    {foreach $single->hsgltt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                     
                                 </td>
                                 <td  width="16%">
                                    {$single->hsgpelvist->title}
                                 </td>
                                 <td width="5%">
                                    
                                 </td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($hysteroscopy)} 
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="hysteroscopy">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="hysteroscopy" data-id="{$id}"  data-table="infertilitysheetid">  Hysteroscopy</a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">PLace</th>
                                 <th  colspan="1">Dil</th>
                                 <th  colspan="1">Introd</th>
                                 <th  colspan="1">CX</th>
                                 <th  colspan="1">Cavity - Fundus</th>
                                 <th  colspan="1">R-Ostium</th>
                                 <th  colspan="1">L-Ostium</th>
                                 <th  colspan="1"></th>
                              </tr>
                               {foreach $hysteroscopy as $single}
                              <tr class="rowhysteroscopy{$single->id}">
                                 <td width="6%">{$single->date}</td>
                                 <td  width="11%">
                                    {$single->copyplacet->title}
                                   
                                 </td>
                                 <td  width="9%">
                                    {$single->copydilt->title}
                                    
                                 </td>
                                 <td  width="9%">
                                    {$single->copyintrodt->title}
                                    
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->copycxt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  width="20%" style="max-width: 33px">
                                    {foreach $single->copycavityt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                   
                                 </td>
                                 <td  width="14%">
                                    {$single->copyrostiumt->title}
                                   
                                 </td>
                                 <td  width="13%">
                                    {$single->copylostiumt->title}
                                    
                                 </td>
                                  <td width="6%">
                                    
                                 </td>
                              </tr>
                              <tr class="rowhysteroscopy{$single->id}">
                                 <th width="6%">Intervention</th>
                                 <td  colspan="3">{$single->hysintervention}
                                  </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->copymcxt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  width="20%" style="max-width: 33px">
                                    {foreach $single->copymcavityt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                    {foreach $single->copymrostiumt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  width="13%" style="max-width: 33px">
                                    {foreach $single->copymlostiumt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                   
                                 </td>
                                 <td width="6%">{$single->coast}</td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                         {/if}
                        {if !empty($laparoscopy)} 
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody id="laparoscopy">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="laparoscopy" data-id="{$id}"  data-table="infertilitysheetid">  Laparoscopy</a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">PLace</th>
                                 <th  colspan="1">UT</th>
                                 <th  colspan="1">RT</th>
                                 <th  colspan="1">LT</th>
                                 <th  colspan="1">RO</th>
                                 <th  colspan="1">LO</th>
                                 <th  colspan="1">Pelvis</th>
                                 <th  colspan=""></th>
                              </tr>
                               {foreach $laparoscopy as $single}
                              <tr class="rowlaparoscopy{$single->id}">
                                 <td width="6%">{$single->date}</td>
                                 <td width="9%">{$single->laparplacet->title}
                                   
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparult as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparrtt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                  
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparltt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                   
                                 </td>
                                 <td  width="20%" style="max-width: 33px">
                                    {foreach $single->laparrot as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                   
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                    {foreach $single->laparlot as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                  
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                    {foreach $single->laparpelvist as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td width="6%">
                                     
                                 </td>
                              </tr>
                              <tr class="rowlaparoscopy{$single->id}">
                                 <th width="6%">Intervention</th>
                                 <td  width="9%">{$single->lapintervention}</td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparmutt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                   
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparmrtt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                 
                                 </td>
                                 <td  width="9%" style="max-width: 33px">
                                    {foreach $single->laparmltt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                  
                                 </td>
                                 <td  width="20%" style="max-width: 33px">
                                    {foreach $single->laparmrot as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    <select   multiple="" class="form-control getselectajax laparmro" name="laparmro" data-id="{$single->id}"  data-table="laparoscopy"  data-celtable="laparmro" id="laparmro{$single->id}" data-selid="{$single->id}" >
                                    </select>
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                    {foreach $single->laparmlot as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                     
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                    {foreach $single->laparmpelvist as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td width="6%">{$single->coast}</td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($infertility->sheetother)} 
                        <table class="table table-bordered hidetable investigations2" >
                           <tbody>
                              <tr>
                                 <td class="colorred">Other</td>
                                 <td  >{$infertility->sheetother}</td>
                              </tr>
                           </tbody>
                        </table>
                        {/if}
                        <!-- <table class="table table-bordered hidetable investigations2" >
                           <tbody>
                              <tr>
                                 <td class="colorred">Lab </td>
                                 <td  ><div class="actions">
                                           <div class="btn-group">
                                               <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                                   Lab <i class="fa fa-angle-down"></i>
                                               </a>
                                               <ul class="dropdown-menu pull-right">
                                                   <li>
                                                       <a href="javascript:;" id="addInv">
                                                           Add </a>
                                                   </li>
                                                   <li>
                                                       <a href="javascript:;" id="showInv" data-controller="gyna">
                                                           Show </a>
                                                   </li>
                                               </ul>
                                           </div>
                           </div></td>
                                 </tr>
                              </tbody>
                        </table> -->
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" data-show="ttt" >TTT</a>
                        </div>
                        <table class="table table-bordered  ttt" >
                           <tbody>
                              <tr>
                                 <td width="15%" >DA</td>
                                 <td width="15%" >Metformin</td>
                                 <td width="35%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td colspan="3" class="colorred">COS</td>
                                       </tr>
                                       <tr>
                                          <th >Type</th>
                                          <th >Response</th>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  width="35%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td colspan="3" class="colorred">IUI</td>
                                       </tr>
                                       <tr>
                                          <th  width="9%">Trials</th>
                                          <th  width="9%">Date</th>
                                          <th  width="9%">Result</th>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                              <tr>
                                 <td  >
                                    {$infertility->tttdat->title}                                     
                                 </td>
                                 <td  >
                                    {$infertility->tttmetformint->title}
                                    
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td style=" max-width: 7px !important;" >
                                              {foreach $infertility->ttttypet as $single}
                                      {$single->title} /
                                    {/foreach}
                                           
                                          </td>
                                          <td  >
                                             {$infertility->tttresponset->title}
                                             
                                          </td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td  width="9%"> {$infertility->sheettrials}</td>
                                          <td  width="9%"> {$infertility->sheetdate}</td>
                                          <td   width="9%"> {$infertility->sheetresult}</td>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        {if !empty($icsi)} 
                        <table class="table table-bordered  ttt" >
                           <tbody id="icsi">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a   data-add="icsi" data-id="{$id}"  data-table="infertilitysheetid">  ICSI</a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">PLace</th>
                                 <th  colspan="1">Protocol</th>
                                 <th  colspan="1">OPU</th>
                                 <th  colspan="1">Semen</th>
                                 <th  colspan="1">Fert</th>
                                 <th  colspan="1">S.S</th>
                                 <th  colspan="1">ET</th>
                                 <th  colspan="1">D</th>
                                 <th  colspan="1">Fr</th>
                                 <th  colspan="1">Re Fr</th>
                                 <th  colspan="1">Result</th>
                                 <th  colspan=""></th>
                              </tr>
                              {foreach $icsi as $single}
                              <tr class="rowicsi{$single->id}">
                                 <td width="8%">{$single->date}</td>
                                 <td  width="10%">
                                    {$single->icsiplacet->title}
                                   
                                 </td>
                                 <td  width="10%">
                                    {$single->icsiprotocol}
                                    <!-- <select    class="form-control getselectajax icsiprotocol" name="icsiprotocol" data-id="{$single->id}"  data-table="icsi"  data-celtable="icsiprotocol" id="icsiprotocol{$single->id}" data-selid="{$single->id}" >
                                    </select> -->
                                 </td>
                                 <td  width="7%" >

                                    {$single->opu}
                                 </td>
                                 <td  width="10%">
                                    {$single->icsisemen}

                                    <!-- <select    class="form-control getselectajax icsisemen" name="icsisemen" data-id="{$single->id}"  data-table="icsi"  data-celtable="icsisemen" id="icsisemen{$single->id}" data-selid="{$single->id}" >
                                    </select> -->
                                 </td>
                                 <td  width="7%" >
                                    {$single->fert}
                                 </td>
                                 <td  width="10%">
                                    {$single->icsiss}
                                   
                                 </td>
                                 <td  width="7%" >
                                    {$single->et}
                                 </td>
                                 <td  width="7%" >
                                    {$single->vd}
                                 </td>
                                 <td width="7%">{$single->fr}</td>
                                 <td width="7%">{$single->refr}</td>
                                 <td  width="10%">
                                    {$single->icsiresult}
                                    <!-- <select    class="form-control getselectajax icsiresult" name="icsiresult" data-id="{$single->id}"  data-table="icsi"  data-celtable="icsiresult" id="icsiresult{$single->id}" data-selid="{$single->id}" >
                                    </select> -->
                                 </td>
                                  <td width="5%">
                                     
                                 </td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($folliculom)} 
                        <table class="table table-bordered  ttt" >
                           <tbody id="folliculom">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="folliculom" data-id="{$id}"  data-table="infertilitysheetid">  FOLLICULOM  </a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">LMP</th>
                                 <th  colspan="1">TTT</th>
                                 <th  colspan="1">CD</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">RO</th>
                                 <th  colspan="1">LO</th>
                                 <th  colspan="1">Endo</th>
                                 <th  colspan="1">Pelvis</th>
                                 <th  colspan="1">TOO</th>
                                 <th  colspan="1">Result</th>
                                 <th  colspan="1"></th>
                              </tr>
                              {foreach $folliculom as $single}
                              <tr class="rowfolliculom{$single->id}">
                                 <td width="7%">{$single->lmp}</td>
                                 <td width="7%">{$single->ttt}</td>
                                 <td  width="7%" >
                                    {$single->cd}
                                 </td>
                                 <td width="7%">{$single->date}
                                 <td width="7%">{$single->ro}</td>
                                 <td width="7%">{$single->lo}</td>
                                 <td width="7%">{$single->endo}</td>
                                 <td width="7%">{$single->pelvis}</td>
                                 <td width="7%">{$single->too}</td>
                                 <td width="7%">{$single->result}</td>
                                  <td width="5%">
                                 </td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        {if !empty($operations)} 
                         <table class="table table-bordered  ttt" >
                           <tbody id="operations">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="operations" data-id="{$id}"  data-table="infertilitysheetid">  operations  </a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1"></th>
                                 <th  colspan="1">operation</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">place</th>
                                 <th  colspan="1">histopath</th>
                                 <th  colspan="1">Cost</th>
                                 <th  colspan="1">nots</th>
                                 <th  colspan="1"></th>
                              </tr>
                              {assign var="i" value="1"}
                              {foreach $operations as $single}
                              <tr class="rowoperations{$single->id}">
                                 <td width="7%">{$i}</td>
                                 <td  width="14%" style="max-width: 33px">
                                     {foreach $single->operationt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                  
                                 </td>
                                 <td  width="7%" >
                                    {$single->date}
                                 </td>
                                 <td width="7%">
                                   {$single->placet->title}
                                 </td>
                                 <td  width="14%" style="max-width: 33px">
                                     {foreach $single->histopatht as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td width="7%">{$single->cost}</td>
                                 <td width="7%">{$single->note}</td>
                                  <td width="5%">
                                     
                                 </td>
                              </tr>
                              {assign var="i" value=$i+1}
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th style="color: #fff;background:red" colspan="14">  PLan </th>
                              </tr>
                              <tr>
                                 <th  width="15%">Husband</th>
                                 <td >
                                    {foreach $infertility->sheethusbandt as $single}
                                      {$single->title} /
                                    {/foreach}
                                    
                                 </td>
                              </tr>
                              <tr>
                                 <th  width="15%">Wife</th>
                                 <td>
                                 {foreach $infertility->sheetwifet as $single}
                                      {$single->title} /
                                    {/foreach}
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        {if !empty($newvisit)} 
                        <table class="table table-bordered">
                           <tbody id="newvisit" >
                              <tr>
                                 <th style="background:#19ae19" colspan="14"> 
                                    <a    data-add="newvisit" data-id="{$id}"  data-table="infertilitysheetid" style="color: #fff" > New Visit </a> </th>
                              </tr>
                              <tr>
                                 <th width="10%" >Date</th>
                                 <th width="10%" >Cycles</th>
                                 <th width="10%" >LMP</th>
                                 <th width="10%" >BW</th>
                                 <th width="35%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <th colspan="3" >
                                             <label class="mt-radio">
                                             <input type="radio" 
                                               {if $infertilitysheet->usvsdtv eq 1} checked {/if} >US
                                             <span></span></label>
                                             <label class="mt-radio">
                                             <input type="radio" 
                                               {if $infertilitysheet->usvsdtv eq 2} checked {/if}  >TVS 
                                             <span></span></label>
                                             <label class="mt-radio">
                                             <input type="radio" 
                                               {if $infertilitysheet->usvsdtv eq 3} checked {/if} >3D TVS 
                                             <span></span></label>
                                             </td>
                                       </tr>
                                       <tr>
                                          <th >UT</th>
                                          <th >OV</th>
                                       </tr>
                                    </table>
                                 </th>
                                 <th  width="35%" >TTT (Button)
                                 </th>
                                  <th  width="5%" >
                                 </th>
                              </tr>
                              {foreach $newvisit as $single}
                              <tr class="rownewvisit{$single->id}">
                                 <td width="7%">{$single->date}</td>
                                 <td  width="15%">
                                    {$single->newvisitcyclest->title}
                                    
                                 </td>
                                 <td width="7%">{$single->lmp}</td>
                                 <td width="10%">{$single->bw}</td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td width="9%">{$single->ut}</td>
                                          <td width="10%">{$single->ov}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  > 
                                    <!-- <div class="actions">
                                     <div class="btn-group">
                                         <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                             TTT <i class="fa fa-angle-down"></i>
                                         </a>
                                         <ul class="dropdown-menu pull-right">
                                             <li>
                                                 <a href="javascript:;" id="addDrug"  data-date="{$presDate}" data-controller="gyna">
                                                     Add </a>
                                             </li>
                                             <li>
                                                 <a href="javascript:;" id="showDrugs" data-controller="gyna">
                                                     Show </a>
                                             </li>
                                         </ul>
                                     </div>
                                     </div>
 -->
                                 </td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                               <tr class="rownewvisit{$single->id}">
                                 <th width="10%" colspan="1">Notes</th>
                                 <td colspan="5">{$single->ttt}</td>
                                 <td></td>
                              </tr>
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}

                        


                      {if !empty($ivfsheet)} 
                        <h2 > IVF Sheet</h2>
                        <hr >
                       
                      
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th width="10%">
                                    Evaluation
                                 </th>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->anevaluation}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->anevaluations}</td>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle" style="background: #1c8b11" data-show="newattempt" >New Attempt</a>
                           
                        </div>
                        <table class="table table-bordered hidetable newattempt" >
                           <tbody>
                              <tr>
                                 <th colspan="3">  Infertility    </th>
                                 <th colspan="5">  ICSI Trial   </th>
                              </tr>
                              <tr>
                                 <td  colspan="1">Type </td>
                                 <td  colspan="1">Duration</td>
                                 <td  colspan="1">AMH</td>
                                 <td  colspan="1">N</td>
                                 <td  colspan="1">Type</td>
                                 <td  colspan="1"> Protocol</td>
                                 <td  colspan="1">TTT</td>
                                 <td  colspan="1">Notes</td>
                              </tr>
                              <tr>
                                 <td  width="15%">
                                    {$ivfsheet->antypet->title}
                                   
                                 </td>
                                 <td width="7%">{$ivfsheet->anduration}</td>
                                 <td  width="7%" >
                                   {$ivfsheet->anamh}
                                 </td>
                                 <td  width="7%" >
                                  {$ivfsheet->annn}
                                 </td>
                                 <td  width="15%">
                                    {$ivfsheet->antypest->title}
                                    </select>
                                 </td>
                                 <td  width="15%">
                                    {$ivfsheet->icsiprotocolt->title}
                                   
                                 </td>
                                 <td width="25%">{$ivfsheet->anttt}</td>
                                 <td width="18%">
                                    {$ivfsheet->annotes}</td>
                              </tr>
                           </tbody>
                        </table>
                        <div class="row rowtoggle" >
                           <a class="btn grey-cascade btn-xs toggle hidetable newattempt fresh2" style="background: #acd6ee" data-show="fresh" >Fresh</a>
                           <a class="btn grey-cascade btn-xs toggle hidetable newattempt frozen2" style="background: #e3c645" data-show="frozen" > Frozen</a>
                        </div>
                        <table class="table table-bordered hidetable fresh">
                            <tr>
                              <th >LMP</th>
                              <td>{$ivfsheet->lmpfresh}</td>
                           </tr>
                        </table>
                        <table class="table table-bordered hidetable frozen">
                           <tr>
                              <th >LMP</th>
                              <td>{$ivfsheet->lmpfrozen}</td>
                           </tr>
                        </table>
                        {if !empty($ovst)} 
                        <table class="table table-bordered hidetable fresh">
                           <tbody id="ovst">
                              <th style="background: #a2b6f8" colspan="21"> <a  style="color: #000;" data-add="ovst"  data-id="{$id}"  data-table="ivfsheetid">  
                              OV. ST.  </a></th>
                              <tr>
                                 <th colspan="1" > CD  </th>
                                 <th colspan="1" >  Date   </th>
                                 <th colspan="1" >   Ag/Antag    </th>
                                 <th colspan="1"  >  HMG  </th>
                                 <th   colspan="1" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th  colspan="13" >F</th>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th width="8%"></th>
                                          <th width="8%" >10</th>
                                          <th width="8%">11</th>
                                          <th width="8%">12</th>
                                          <th width="8%">13</th>
                                          <th width="8%">14</th>
                                          <th width="8%">15</th>
                                          <th width="8%">16</th>
                                          <th width="8%">17</th>
                                          <th width="7%">18</th>
                                          <th width="7%">19</th>
                                          <th width="7%">20</th>
                                          <th width="7%">..</th>
                                       </tr>
                                    </table>
                                 </th>
                                 <th colspan="1" >  E   </th>
                                 <th colspan="1" >   E2    </th>
                                 <th colspan="1" > Notes   </th>
                                  <th colspan="1" >    </th>
                              </tr>
                              {foreach $ovst as $single}
                              <tr class="rowovst{$single->id}">
                                 <td  width="7%" >
                                   {$single->ovstcdfh}
                                 </td>
                                 <td  width="8%" >{$single->ovstdate}
                                 </td>
                                 <td  width="7%" >{$single->ovstag}
                                 </td>
                                 <td  width="7%" >{$single->ovsthmg}
                                 </td>
                                 <th   colspan="1" style="background: #a2b6f8;padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th  width="8%" >
                                             R
                                          </th>
                                          <td  width="8%" >{$single->ovstfr}
                                          </td>
                                          <td  width="8%" >{$single->ovstfrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstfrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstfrrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstffrrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstfffrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstffffrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstfffffr}
                                          </td>
                                          <td  width="7%" >{$single->ovstffffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstfrfffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstfrrffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstfrrffff}
                                          </td>
                                          
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th  width="8%" >
                                             L
                                          </th>
                                          <td  width="8%" >
                                             {$single->ovstdfr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdfrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdfrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdfrrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdffrrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdfffrrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdffffrr}
                                          </td>
                                          <td  width="8%" >{$single->ovstdfffffr}
                                          </td>
                                          <td  width="7%" >{$single->ovstdffffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstdfrfffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstdfrrffff}
                                          </td>
                                          <td  width="7%" >{$single->ovstdfrrffff}
                                          </td>
                                          
                                       </tr>
                                    </table>
                                 </th>
                                 <td  width="7%" >{$single->eovst}
                                 </td>
                                 <td  width="7%" >{$single->eeovst}
                                 </td>
                                 <td  width="7%" >{$single->noteovst}
                                 </td>
                                 <td width="5%">
                                    
                                 </td>
                              </tr>
                                {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        <table class="table table-bordered hidetable fresh">
                           <tbody>
                              <tr>
                                 <th colspan="3" style="background: #a2b6f8"> TOO  </th>
                                 <th colspan="4" style="background: #a2b6f8">  OPU   </th>
                                 <th colspan="4" style="background: #a2b6f8">   Semen    </th>
                                 <th colspan="2" style="background: #a2b6f8">  F/E  D2   </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">CD </th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">Drug</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">N</th>
                                 <th  colspan="1"> Diff N</th>
                                 <th  colspan="1">Notes</th>
                                 <th  colspan="1"></th>
                                 <th  colspan="1"></th>
                                 <th  colspan="1"></th>
                                 <th  colspan="1"></th>
                                 <th  colspan="1"> N</th>
                                 <th  colspan="1">Diff N</th>
                              </tr>
                              <tr>
                                 <td  width="7%" >{$ivfsheet->toocd}
                                 </td>
                                 <td width="8%">{$ivfsheet->toodate}</td>
                                 <td  width="7%" >{$ivfsheet->toodrug}
                                 </td>
                                 <td width="8%">{$ivfsheet->opudate}</td>
                                 <td  width="7%" >{$ivfsheet->opun}
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th >Mll</th>
                                          <td  width="7%" >
                                             {$ivfsheet->opumll}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >Ml</th>
                                          <td  width="7%" >
                                            {$ivfsheet->opuml}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >GV</th>
                                          <td  width="7%" >
                                            {$ivfsheet->opugv}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >At</th>
                                          <td  width="7%" >{$ivfsheet->opuat}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >?...</th>
                                          <td  width="50%" >
                                           {$ivfsheet->oopuu}
                                          </td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  width="7%" >{$ivfsheet->opunote}
                                 </td>
                                 <td  width="10%">
                                     {$ivfsheet->ssement->title}
                                    
                                 </td>
                                 <td  width="10%">
                                     {$ivfsheet->sseement->title}
                                    
                                 </td>
                                 <td  width="10%">
                                     {$ivfsheet->icsisement->title}
                                    
                                 </td>
                                 <td  width="10%">
                                     {$ivfsheet->sseemmeent->title}
                                    
                                 </td>
                                 <td  width="7%" >{$ivfsheet->fefn}
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th >A</th>
                                          <td  width="50%"  >
                                             {$ivfsheet->fefa}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >B</th>
                                          <td  width="7%" >{$ivfsheet->fefb}
                                          </td>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >C</th>
                                          <td  width="7%" >{$ivfsheet->fefc}
                                          </td>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="table table-bordered hidetable fresh">
                           <tbody>
                              <tr>
                                 <th colspan="2" style="background: #a2b6f8">  S . S   </th>
                                 <th colspan="6" style="background: #a2b6f8">  ET   </th>
                                 <th colspan="3" style="background: #a2b6f8">   FR    </th>
                                 <th colspan="4" style="background: #a2b6f8">  Outcome   </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">N of T.E </th>
                                 <th  colspan="1">Result</th>
                                 <th  colspan="1">CD</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">N</th>
                                 <th  colspan="1"> G</th>
                                 <th  colspan="1">Notes</th>
                                 <th  colspan="1">Cancel</th>
                                 <th  colspan="1">CD</th>
                                 <th  colspan="1">ST</th>
                                 <th  colspan="1">EN</th>
                                 <th  colspan="1"> </th>
                                 <th  colspan="1">HSG</th>
                                 <th  colspan="1">TVS</th>
                                 <th  colspan="1">Del</th>
                              </tr>
                              <tr>
                                 <td  width="7%" >{$ivfsheet->sssnofte}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->sssresult}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->ssscd}
                                 </td>
                                 <td  width="9%" >{$ivfsheet->ettdate}</td>
                                 <td  width="7%" >{$ivfsheet->ettn}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->ettg}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->ettnote}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->ettcancel}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->frrcd}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->frrst}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->frren}
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th >Date</th>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >Result</th>
                                       </tr>
                                    </table>
                                 </td>
                                <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->ooutcomehsgd}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->ooutcomehsgn}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->ooutcometvsd}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->ooutcometvsn}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->ooutcomedeld}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->ooutcomedeln}</td>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                         {if !empty($eprep)} 
                         <table class="table table-bordered hidetable frozen">
                           <tbody id="eprep">
                             
                              <tr>
                                 <th colspan="6" style="background: #fcaf42"> <a  style="color: #000;" data-add="eprep"  data-id="{$id}"  data-table="ivfsheetid">  
                              E Prep  </a>
                                 </th>
                                 <th colspan="2" style="background: #fcaf42">     </th>
                                 <th colspan="4" style="background: #fcaf42">   Thawing    </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">CD </th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">TTT</th>
                                 <th  colspan="1">E</th>
                                 <th  colspan="1">RO</th>
                                 <th  colspan="1"> LO</th>
                                 <th  colspan="1">Cancel</th>
                                 <th  colspan="1">L P S</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">ST.N</th>
                                 <th  colspan="1">EN</th>
                                 <th  colspan="1"></th>
                              </tr>
                              {foreach $eprep as $single}
                              <tr class="roweprep{$single->id}">
                                 <td  width="7%" >
                                   {$single->eprepcd}
                                 </td>
                                 <td  width="8%" >
                                    {$single->eprepdate}
                                 </td>
                                 <td  width="7%" >{$single->eprepttt}
                                 </td>
                                 <td >{$single->eprepe}</td>
                                 <td  width="7%" >
                                   {$single->eprepro}
                                 </td>
                                 <td  width="7%" >
                                    {$single->epreplo}
                                 </td>
                                 <td  width="7%" >
                                    {$single->eprepcancel}
                                 </td>
                                 <td  width="20%">
                                     {$single->epreplpst->title}
                                    
                                 </td>
                                 <td  width="8%" >
                                  {$single->thawingdate}
                                 </td>
                                 <td >{$single->thawingstn}</td>
                                 <td >{$single->thawingen}</td>
                                 <td width="5%">
                                    
                                 </td>
                              </tr>
                                {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        <table class="table table-bordered hidetable frozen">
                           <tbody>
                              <tr>
                                 <th colspan="2" style="background: #fcaf42">  S . S   </th>
                                 <th colspan="6" style="background: #fcaf42">  ET   </th>
                                 <th colspan="1" style="background: #fcaf42">  Re Fr    </th>
                                 <th colspan="4" style="background: #fcaf42">  Outcome   </th>
                              </tr>
                              <tr>
                                 <th  colspan="1">N of T.E </th>
                                 <th  colspan="1">Result</th>
                                 <th  colspan="1">CD</th>
                                 <th  colspan="1">Date</th>
                                 <th  colspan="1">N</th>
                                 <th  colspan="1"> G</th>
                                 <th  colspan="1">Notes</th>
                                 <th  colspan="1">Cancel</th>
                                 <th  colspan="1">EN</th>
                                 <th  colspan="1"> </th>
                                 <th  colspan="1">HSG</th>
                                 <th  colspan="1">TVS</th>
                                 <th  colspan="1">Del</th>
                              </tr>
                              <tr>
                                 <td  width="7%" >{$ivfsheet->ssnofte}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->ssresult}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->etcd}
                                 </td>
                                 <td >{$ivfsheet->etdate}</td>
                                 <td  width="7%" >{$ivfsheet->etn}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->etg}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->etnote}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->etcancel}
                                 </td>
                                 <td  width="7%" >{$ivfsheet->refren}
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr style="height: 31px;">
                                          <th >Date</th>
                                       </tr>
                                       <tr style="height: 31px;">
                                          <th >Result</th>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->outcomehsgd}
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->outcomehsgn}
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->outcometvsd}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->outcometvsn}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td >{$ivfsheet->outcomedeld}</td>
                                       </tr>
                                       <tr>
                                          <td >{$ivfsheet->outcomedeln}</td>
                                       </tr>
                                    </table>
                                 </td>
                              </tr>
                           </tbody>
                        </table>
                        {/if}







                         <h2 style="font-weight: bold">  Gyna Sheet</h2>
                         {if !empty($newvisitg)} 
                        <table class="table table-bordered">
                           <tbody id="newvisitg">
                              <tr>
                                  <th style="background:#19ae19" colspan="14"> 
                                    <a  data-add="newvisitg" data-id="{$gynasheetid}"  data-table="gynasheetid" style="color: #fff" > New Visit </a> </th>
                              </tr>
                              <tr>
                                 <th width="10%" >Date</th>
                                 <th width="10%" >Cycles</th>
                                 <th width="10%" >LMP</th>
                                 <th width="10%" >BW</th>
                                 <th width="35%" style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <th colspan="3" >
                                             <label class="mt-radio">
                                             <input type="radio"
                                               {if $gynasheet->usvsdtv eq 1} checked {/if} >US
                                             <span></span></label>
                                             <label class="mt-radio">
                                             <input type="radio"
                                               {if $gynasheet->usvsdtv eq 2} checked {/if}  >TVS 
                                             <span></span></label>
                                             <label class="mt-radio">
                                             <input type="radio" 
                                               {if $gynasheet->usvsdtv eq 3} checked {/if} >3D TVS 
                                             <span></span></label>
                                             </td>
                                       </tr>
                                       <tr>
                                          <th >UT</th>
                                          <th >OV</th>
                                       </tr>
                                    </table>
                                 </th>
                                 <th  width="35%" >   Notes
                                 </th>
                                  <th  width="5%" >   
                                 </th>
                              </tr>
                              {foreach $newvisitg as $single}
                              <tr class="rownewvisitg{$single->id}"> 
                                 <td width="7%">{$single->date}</td>
                                 <td  width="15%">
                                    {$single->newvisitcyclest->title}
                                    
                                 </td>
                                 <td width="7%">{$single->lmp}</td>
                                 <td width="10%">{$single->bw}</td>
                                 <td  style="padding: 0px">
                                    <table style="width: 100%;margin-bottom: 0px;">
                                       <tr>
                                          <td width="10%">{$single->ut}</td>
                                          <td width="10%">{$single->ov}</td>
                                       </tr>
                                    </table>
                                 </td>
                                 <td  >
                                 {$single->noteg}
                                 </td>
                                 <td width="5%">
                                     
                                 </td>
                              </tr>
                              <tr class="rownewvisitg{$single->id}">
                                 <th colspan="4">C/O</th>
                                 <th colspan="1">Diagnosis</th>
                                 <th colspan="2">TTT (Button)</th>
                              </tr>
                              <tr class="rownewvisitg{$single->id}">
                                 <td  colspan="4">
                                    {foreach $single->newvisitgcot as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                    
                                 </td>
                                 <td  colspan="1">
                                    {foreach $single->newvisitgdiagt as $single2}
                                      {$single2->title} /
                                    {/foreach} 
                                     
                                 </td>
                                 <td colspan="4"><!--  <div class="btn-group">
                                <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                    TTT <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <a href="javascript:;" id="addDrug"  data-date="{$presDate}" data-controller="gyna">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showDrugs" data-controller="gyna">
                                            Show </a>
                                    </li>
                                </ul>
                            </div> -->
                        <!-- </div>  -->
                     </td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}

                         {if !empty($ancsheet)} 
                          <h2 style="font-weight: bold"> ANC Sheet</h2>

                      
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th  colspan="1">LMP</th>
                                 <th  colspan="1">EDD</th>
                                 <th  colspan="1">G</th>
                                 <th  colspan="1">P</th>
                                 <th  colspan="1">EPC</th>
                                 <th  colspan="1">Last Hb</th>
                                 <th  colspan="1">Placenta</th>
                                 <th  colspan="1">Notes</th>
                              </tr>
                              <tr>
                                 <td width="7%">{$ancsheet->sheetlmp}
                                 <td width="7%">{$ancsheet->sheetedd}</td>
                                 <td  width="7%" id="obstgv">
                                  {$infertility->obstg}  
                                 </td>
                                 <td  width="7%" id="obstpv">
                                    {$infertility->obstp}
                                 </td>
                                 <td  width="7%" id="obstepcv">
                                    {$infertility->obstepc}
                                 </td>
                                 <td width="7%">{$ancsheet->sheetlast}</td>
                                 <td  width="15%">
                                    {$ancsheet->placentat->title}
                                   
                                 </td>
                                 <td width="18%">{$ancsheet->sheetnte}</td>
                              </tr>
                           </tbody>
                        </table>
                        
                       
                       {if !empty($ancinvestigations)} 
                        <table class="table table-bordered">
                           <tbody id="investigations">
                              <tr>
                                 <th scope="row" style="color: #fff;background:red" colspan="11">
                                    <a  style="color: #fff;" data-add="investigations"  data-id="{$id}"  data-table="ancsheetid">  Investigations</a>
                                 </th>
                              </tr>
                              <tr>
                                 <td width="10%"></td>
                                 <td  width="10%" class="colorred">Hb</td>
                                 <td width="10%"class="colorred">Plat</td>
                                 <td width="10%"class="colorred">FBS</td>
                                 <td width="10%"class="colorred">OGTT</td>
                                 <td width="10%"class="colorred">HBs Ag</td>
                                 <td width="10%"class="colorred"> HCV Ab</td>
                                 <td width="10%"class="colorred">CUA</td>
                                 <td width="10%"class="colorred">Ferritin</td>
                                 <td width="10%"class="colorred">Lab</td>
                                  <td width="10%"class="colorred"></td>
                              </tr>
                              {foreach $ancinvestigations as $single}
                              <tr class="rowinvestigations{$single->id}"> 
                                 <th  >Date</th>
                                 <td >{$single->invesdhb}</td>
                                 <td >{$single->invesdplat}</td>
                                 <td >{$single->invesdfbs}</td>
                                 <td >{$single->invesdogtt}</td>
                                 <td >{$single->invesdhbs}</td>
                                 <td >{$single->invesdhcv}</td>
                                 <td >{$single->invesdcua}</td>
                                 <td >{$single->invesdferr}</td>
                                 <td >
                                 <!--    <div class="actions">
                                           <div class="btn-group">
                                               <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                                   Lab <i class="fa fa-angle-down"></i>
                                               </a>
                                               <ul class="dropdown-menu pull-right">
                                                   <li>
                                                       <a href="javascript:;" id="addInv">
                                                           Add </a>
                                                   </li>
                                                   <li>
                                                       <a href="javascript:;" id="showInv" data-controller="gyna">
                                                           Show </a>
                                                   </li>
                                               </ul>
                                           </div>
                        </div> -->
                     </td>
                                 <td width="5%">
                                    <!--  <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="investigations">
                                         <i class="fa fa-close"></i>
                                     </a> -->
                                 </td>
                              </tr>
                              <tr class="rowinvestigations{$single->id}"> 
                                 <th  >Result</th>
                                  <td >{$single->investhb}</td>
                                 <td >{$single->investplat} </td>
                                 <td >{$single->investfbs}</td>
                                 <td >{$single->invesdogtt}</td>
                                 <td >{$single->investhbs}</td>
                                 <td >{$single->investhcv}</td>
                                 <td >{$single->investcua}</td>
                                 <td >{$single->investferr}</td>
                                 <td ></td>
                                 <td></td>
                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                        <table class="table table-bordered">
                           <tbody>
                              <tr>
                                 <th scope="row" style="color: #fff;background:red" colspan="10">
                                    4D
                                 </th>
                              </tr>
                              <tr>
                                 <td width="10%"></td>
                                 <td  class="colorred" width="40%">T1 Scan</td>
                                 <td class="colorred">T2 Scan</td>
                              </tr>
                              <tr>
                                 <th  >Date</th>
                                 <td >{$ancsheet->tscandate}</td>
                                 <td >{$ancsheet->ttscandate}</td>
                              </tr>
                              <tr>
                                 <th  >W</th>
                                 <td >{$ancsheet->tscanw}</td>
                                 <td >{$ancsheet->ttscanw}</td>
                              </tr>
                              <tr>
                                 <th  >Result</th>
                                 <td >{$ancsheet->tscanresult}</td>
                                 <td >{$ancsheet->ttscanresult}</td>
                              </tr>
                              <tr>
                                 <th  >Report</th>
                                 <td >{$ancsheet->tscanreport}</td>
                                 <td >{$ancsheet->ttscanreport}</td>
                              </tr>
                           </tbody>
                        </table>
                        {if !empty($ancnewvisit)} 
                        <table class="table table-bordered">
                           <tbody id="ancnewvisit">
                              <tr>
                                 <th style="color: #fff;background:#19ae19" colspan="14"> 
                                 <a style="color: #fff"  data-add="ancnewvisit" data-id="{$id}"  data-table="ancsheetid">New Visit</a>
                                </th>
                              </tr>
                              {foreach $ancnewvisit as $single}
                              <tr class="rowancnewvisit{$single->id}"> 
                                 <th width="10%" >Date</th>
                                 <th width="10%" >W</th>
                                 <th width="10%" >BW</th>
                                 <th width="10%" >BP</th>
                                 <th  width="25%" >Notes</th>
                                 <th  width="30%" >TTT (Button)</th>
                                  <th  width="5" ></th>
                              </tr>
                             <tr class="rowancnewvisit{$single->id}"> 
                                 <td >{$single->newvisitdate}</td>
                                 <td ><label data-id="{$single->id}" {if $single->newvisitdate < $ancsheet->sheetlmp}style="color: red;font-size: 18px;" {else} style="color: maroon; font-weight : bolder; font-size: 18px;" {/if}>


                                    {$single->newvisitw}</label>
                                    </td>
                                 <td >{$single->newvisitbw}</td>
                                 <td >{$single->newvisitbp}</td>
                                 <td >{$single->newvisitnote}</td>
                                     <td  > 
                                   <!--  <div class="actions">
                                     <div class="btn-group">
                                         <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                             TTT <i class="fa fa-angle-down"></i>
                                         </a>
                                         <ul class="dropdown-menu pull-right">
                                             <li>
                                                 <a href="javascript:;" id="addDrug"  data-date="{$presDate}" data-controller="gyna">
                                                     Add </a>
                                             </li>
                                             <li>
                                                 <a href="javascript:;" id="showDrugs" data-controller="gyna">
                                                     Show </a>
                                             </li>
                                         </ul>
                                     </div>
                                     </div>
 -->
                                 </td>
                                 <td>
                                    <!-- a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="ancnewvisit">
                                         <i class="fa fa-close"></i>
                                     </a> -->
                                 </td>
                              </tr>
                        
                             
                             <tr class="rowancnewvisit{$single->id}"> 
                                 <th width="10%" >N</th>
                                 <th width="10%" >Biom - FHR</th>
                                 <th width="20%" >EFW</th>
                                 <th width="20%" >Placenta</th>
                                 <th  width="20%" >AF</th>
                                 <th  width="20%" >Notes</th>
                                 <th  width="5" ></th>
                              </tr>
                              <tr class="rowancnewvisit{$single->id}"> 
                                 <td  >
                                    {$single->usnt->title}
                                    
                                 </td>
                                 <td >{$single->usbiom}</td>
                                 <td >{$single->usefw}</td>
                                 <td  width="10%">
                                     {$single->usplacet->title}
                                
                                 </td>
                                 <td  width="10%">
                                     {$single->usaft->title}
                                    
                                 </td>
                                 <td >{$single->newvisitnote2}</td>
                                 <td></td>

                              </tr>
                               {/foreach}
                           </tbody>
                        </table>
                        {/if}
                          {if !empty($registeration)} 
                       
                        <table class="table table-bordered  ttt" >
                           <tbody id="registeration">
                              <tr>
                                 <th scope="row" class="thhead" colspan="14">
                                    <a  data-add="registeration" data-id="{$id}"  data-table="ancsheetid">  registeration  </a>
                                 </th>
                              </tr>
                              <tr>
                                 <th  colspan="1"></th>
                                 <th  colspan="1">(Obst History) P</th>
                                 <th  colspan="1">place</th>
                                 <th  colspan="1">origin</th>
                                 <th  colspan="1">type</th>
                                 <th  colspan="1">Cost</th>
                                 <th  colspan="1"></th> 
                              </tr>
                              {assign var="i" value="1"}
                              {foreach $registeration as $single}
                              <tr class="rowregisteration{$single->id}">
                                 <td width="7%">{$i}</td>
                                 <td width="7%">{$single->awifept->name}
                                   
                                 </td>
                                 <td width="7%">{$single->place2t->title}
                                   
                                 </td>
                                  <td width="7%">{$single->origint->title}
                                   
                                 </td>
                                  <td width="7%">{$single->typet->title}
                                   
                                 </td>
                                 <td width="7%">{$single->coast}</td>
                                  <td width="5%">
                                     
                                 </td>
                              </tr>
                              {assign var="i" value=$i+1}
                              {/foreach}
                           </tbody>
                        </table>
                        {/if}
                         {/if}
                       
                    
                        
                     </div>
                 
      </div>
   </div>
</div>

