{if $tablename == "semeninfertility"}
<tr class="rowsemen{$id}">
    <td colspan="2" width="8%"><input class="form-control datepicker"  type="text"   name="date" data-id="{$id}"  data-table="semeninfertility" ></td>
    <td colspan="2" width="20%">
        <select  class="form-control getselectajax2 semenplace" name="semenplace" data-id="{$id}"  data-table="semeninfertility"  data-celtable="semenplace" id="semenplace{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td colspan="2" width="20%">
        <select  class="form-control getselectajax2 sementype" name="sementype" data-id="{$id}"  data-table="semeninfertility"  data-celtable="sementype" id="sementype{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td ><input type="text" name="nc" data-id="{$id}"  data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="prm" data-id="{$id}" data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="tm" data-id="{$id}"  data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="af" data-id="{$id}"  data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="vit" data-id="{$id}" data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="vol" data-id="{$id}" data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="tzi" data-id="{$id}" data-table="semeninfertility" class="form-control" /></td>
    <td ><input type="text" name="sdi" data-id="{$id}" data-table="semeninfertility" class="form-control" /></td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="semeninfertility">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
{else if $tablename == "semen2"}
<tr class="rowsemen2{$id}">
    <th  >Date</th>
    <td ><input class="form-control datepicker"  type="text"   value="{$single->detescrotal}" name="detescrotal" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"   value="{$single->detetrue}" name="detetrue" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->detekaryo}"  name="detekaryo" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->deteyqmicro}"  name="deteyqmicro" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->detesdf}"  name="detesdf" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->detesemenfr}"  name="detesemenfr" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->detetese}"  name="detetese" data-id="{$id}"  data-table="semen2"   ></td>
    <td ><input class="form-control datepicker"  type="text"  value="{$single->deteother}"  name="deteother" data-id="{$id}"  data-table="semen2"   ></td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="semen2">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowsemen2{$id}">
    <th  >PLace</th>
    <td ><input type="text"  name="placescrotal" data-id="{$id}" value="{$single->placescrotal}" data-table="semen2"   class="form-control" /></td>
    <td ><input type="text"  name="placetrue" data-id="{$id}"  value="{$single->placetrue}" data-table="semen2"   class="form-control" /></td>
    <td ><input type="text"  name="placekaryo" data-id="{$id}"  value="{$single->placekaryo}" data-table="semen2"   class="form-control" /></td>
    <td ><input type="text"  name="placeyqmicro" data-id="{$id}"  value="{$single->placeyqmicro}" data-table="semen2"   class="form-control" /></td>
    <td ><input type="text"  name="placesdf" data-id="{$id}"  value="{$single->placesdf}" data-table="semen2"   class="form-control" /></td>
    <td >
        <select  class="form-control getselectajax2 semen2placesemenfr" name="semen2placesemenfr" data-id="{$id}"  data-table="semen2"  data-celtable="semen2placesemenfr" id="semen2placesemenfr{$id}" data-selid="{$id}" 
                 data-new="">
        </select>
    </td>
    <td >
        <select  class="form-control getselectajax2 semen2placetese" name="semen2placetese" data-id="{$id}"  data-table="semen2"  data-celtable="semen2placetese" id="semen2placetese{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td ><input type="text" name="placeother" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
    <td></td>
</tr>
<tr class="rowsemen2{$id}">
    <th scope="row" >Result</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 semen2resultscrotal" name="semen2resultscrotal" data-id="{$id}"  data-table="semen2"  data-celtable="semen2resultscrotal" id="semen2resultscrotal{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td >
        <select  class="form-control getselectajax2 semen2resulttrue" name="semen2resulttrue" data-id="{$id}"  data-table="semen2"  data-celtable="semen2resulttrue" id="semen2resulttrue{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td >
        <select  class="form-control getselectajax2 semen2resultkaryo" name="semen2resultkaryo" data-id="{$id}"  data-table="semen2"  data-celtable="semen2resultkaryo" id="semen2resultkaryo{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td >
        <select  class="form-control getselectajax2 semen2resultyqmicro" name="semen2resultyqmicro" data-id="{$id}"  data-table="semen2"  data-celtable="semen2resultyqmicro" id="semen2resultyqmicro{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td >
        <select  class="form-control getselectajax2 semen2resultsdf" name="semen2resultsdf" data-id="{$id}"  data-table="semen2"  data-celtable="semen2resultsdf" id="semen2resultsdf{$id}" data-selid="{$id}" >
        </select>
    </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 ><input type="text" name="resultsemenfrc" value="{$single->resultsemenfrc}" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
                <td ><input type="text" name="resultsemenfrm" value="{$single->resultsemenfrm}" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
                <td ><input type="text" name="resultsemenfraf" value="{$single->resultsemenfraf}" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
            </tr>
        </table>
    </td>
    <td ><input type="text" name="resulttese" value="{$single->resulttese}" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
    <td ><input type="text" name="resultother" value="{$single->resultother}" data-id="{$id}"  data-table="semen2" class="form-control" /></td>
    <td></td>
</tr>
{else if $tablename == "hormonalprofile"}
<tr class="rowhormonalprofile{$id}">
    <th scope="row" >Date</th>
    <td ><input class="form-control datepicker" name="datefsh" type="text"  value="{$single->datefsh}"  data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="datelh" type="text"  value="{$single->datelh}"  data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="datett" type="text"  value="{$single->datett}"  data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="dateprl" type="text"   value="{$single->dateprl}" data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="datee2" type="text"   value="{$single->datee2}" data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="dateinhibin" type="text"    data-id="{$id}"  data-table="hormonalprofile"  value="{$single->dateinhibin}"></td>
    <td ><input class="form-control datepicker" name="dateother" type="text"  value="{$single->dateother}"  data-id="{$id}"  data-table="hormonalprofile"  ></td>
    <td ><input class="form-control datepicker" name="dateother1" type="text"    data-id="{$id}" value="{$single->dateother1}" data-table="hormonalprofile"  ></td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="hormonalprofile">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowhormonalprofile{$id}">
    <th scope="row" >Result</th>
    <td ><input type="text" name="resultfsh"  data-id="{$id}" value="{$single->resultfsh}" data-table="hormonalprofile"class="form-control" /></td>
    <td ><input type="text" name="resultlh" data-id="{$id}"    value="{$single->resultlh}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resulttt"  data-id="{$id}"  value="{$single->resulttt}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resultprl"  data-id="{$id}" value="{$single->resultprl}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resulte2"  data-id="{$id}" value="{$single->resulte2}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resultinhibin" data-id="{$id}" value="{$single->resultinhibin}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resultother"  data-id="{$id}"  value="{$single->resultother}" data-table="hormonalprofile" class="form-control" /></td>
    <td ><input type="text" name="resultother1"  data-id="{$id}" value="{$single->resultother1}" data-table="hormonalprofile" class="form-control" /></td>
    <td></td>
</tr>

{else if $tablename == "awifep"}

<tr class="rowawifep{$id}">  
    <td  width="10%">
        <select   class="form-control getselectajax2 wifesex" name="wifesex" data-id="{$id}"  data-table="awifep"  data-celtable="wifesex" id="wifesex{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td width="5%"><input type="text" name="name" value="{$name}"  data-id="{$id}"  data-table="awifep"  class="form-control" /></td>
    <td width="10%"><input class="form-control datepicker getymt"  type="text"    name="date" data-id="{$id}"  data-table="awifep"   ></td>
    <td width="5%" id="awifepmonth_{$id}"></td>
    <td  width="10%">
        <select  class="form-control getselectajax2 wifemodeofd" name="wifemodeofd" data-id="{$id}"  data-table="awifep"  data-celtable="wifemodeofd" id="wifemodeofd{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td   width="10%">
        <select   class="form-control getselectajax2 wifetypeofd" name="wifetypeofd" data-id="{$id}"  data-table="awifep"  data-celtable="wifetypeofd" id="wifetypeofd{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="5%" >
        <input type="text" name="wifew" value="{$wifew}"  data-id="{$id}"  data-table="awifep"  class="form-control digitsOnly" />
    </td>
    <td  width="5%"  >

        <input  type="checkbox"  name="wifel" value="1"
                data-id="{$id}"  data-table="awifep"  class="form-control checkbox" >

    </td>
    <td  width="10%" style="max-width: 20px !important;" >
        <select  multiple="" class="form-control getselectajax2 wifeobst" name="wifeobst" data-id="{$id}"  data-table="awifep"  data-celtable="wifeobst" id="wifeobst{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="25%" style="padding: 0px">
        <table style="width: 100%;margin-bottom: 0px;">
            <tr>
                <td  width="33%" style="max-width: 33px">
                    <select  multiple="" class="form-control getselectajax2 awifeppmethod" name="awifepmethod" data-id="{$id}"  data-table="awifep"  data-celtable="awifepmethod" id="awifepmethod{$id}" data-selid="{$id}" >
                    </select>
                </td>
                <td width="33%"><input type="text" name="duration" value="{$duration}"  data-id="{$id}"  data-table="awifep"  class="form-control" /></td>
                <td width="33%"><input type="text" name="stopped" value="{$stopped}"  data-id="{$id}"  data-table="awifep"  class="form-control" /></td>
            </tr>
        </table>
    </td>
</td>
<td width="5%"><input type="text" name="comment" value="{$comment}"  data-id="{$id}"  data-table="awifep"  class="form-control" /></td>
<td width="5%">
    <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="{$id}"  data-table="awifep">
        <i class="fa fa-close"></i>
    </a>
</td>
</tr>
{else if $tablename == "wifeepc"}
<tr class="rowwifeepc{$id}">    
    <td width="10%"><input type="text" name="wifeepcdate" data-id="{$id}"  data-table="wifeepc" class="form-control datepicker" /></td>
    <td >
        <select  class="form-control getselectajax2 wifeepctype" name="wifeepctype" data-id="{$id}"  data-table="wifeepc"  data-celtable="wifeepctype" id="wifeepctype{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td width="10%"><input type="text" name="wifeepcw"   data-id="{$id}"  data-table="wifeepc" class="form-control" /></td>
    <td >
        <select  class="form-control getselectajax2 wifeepcttt" name="wifeepcttt" data-id="{$id}"  data-table="wifeepc"  data-celtable="wifeepcttt" id="wifeepcttt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td >
        <select   class="form-control getselectajax2 wifeepcobst" name="wifeepcobst" data-id="{$id}"  data-table="wifeepc"  data-celtable="wifeepcobst" id="wifeepcobst{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="10%"><input class="form-control"  type="text"  name="histopath"  data-id="{$id}"  data-table="wifeepc" ></td>
    <td width="10%"><input type="text" name="coast" data-id="{$id}"  data-table="wifeepc" class="form-control digitsOnly" /></td>
    <td ><input type="text" name="wifeepcp"  data-id="{$id}"  data-table="wifeepc" class="form-control" /></td>
    <td ><input type="text" name="wifeepcepc"   data-id="{$id}"  data-table="wifeepc" class="form-control" /></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="{$id}"  data-table="wifeepc">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowwifeepc{$id}">    
    <td colspan="10"><input type="text" name="wifeepnots" data-id="{$id}"  data-table="wifeepc" class="form-control " placeholder="Note" />
</tr>

{else if $tablename == "hormonalprofile2"}
<tr class="rowhormonalprofile2{$id}">

    <th scope="row" >Date</th>
    <td ><input class="form-control datepicker"  type="text" name="dateamh" value="{$single->dateamh}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"   name="datetsh" value="{$single->datetsh}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="dateprl" value="{$single->dateprl}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="datefsh" value="{$single->datefsh}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="datelh" value="{$single->datelh}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="datee2" value="{$single->datee2}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="datep4" value="{$single->datep4}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td ><input class="form-control datepicker"  type="text"    name="dateother" value="{$single->dateother}"  data-id="{$id}"  data-table="hormonalprofile2"  ></td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="hormonalprofile2">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowhormonalprofile2{$id}">
    <th scope="row" >Result</th>
    <td ><input type="text" name="resultamh" value="{$single->resultamh}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resulttsh" value="{$single->resulttsh}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resultprl" value="{$single->resultprl}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resultfsh" value="{$single->resultfsh}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resultlh" value="{$single->resultlh}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resulte2" value="{$single->resulte2}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resultp4" value="{$single->resultp4}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td ><input type="text" name="resultother" value="{$single->resultother}"  data-id="{$id}"  data-table="hormonalprofile2" class="form-control" /></td>
    <td></td>
</tr>

{else if $tablename == "tvs"}
<tr class="rowtvs{$id}">    
    <th width="15%" >Date</th>
    <td ><input class="form-control datepicker"  type="text"    name="comment" value="{$single->comment}"  data-id="{$id}"  data-table="tvs"  ></td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="tvs">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowtvs{$id}">   
    <th width="15%" >UT</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 tvsut" name="tvsut" data-id="{$id}"  data-table="tvs"  data-celtable="tvsut" id="tvsut{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td></td>
</tr>
<tr class="rowtvs{$id}">   
    <th width="15%" >CX</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 tvscx" name="tvscx" data-id="{$id}"  data-table="tvs"  data-celtable="tvscx" id="tvscx{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td></td>
</tr>
<tr class="rowtvs{$id}">   
    <th width="15%" >RO</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 tvsro" name="tvsro" data-id="{$id}"  data-table="tvs"  data-celtable="tvsro" id="tvsro{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td></td>
</tr>
<tr class="rowtvs{$id}">   
    <th width="15%" >LO</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 tvslo" name="tvslo" data-id="{$id}"  data-table="tvs"  data-celtable="tvslo" id="tvslo{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td></td>
</tr>
<tr class="rowtvs{$id}">   
    <th width="15%" >Pelvis</th>
    <td >
        <select  multiple="" class="form-control getselectajax2 tvspelvis" name="tvspelvis" data-id="{$id}"  data-table="tvs"  data-celtable="tvspelvis" id="tvspelvis{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td></td>
</tr>

{else if $tablename == "dtvs"}
<tr class="rowdtvs{$id}">   
    <td ><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$id}"  data-table="dtvs" ></td>
    <td  >
        <select  multiple="" class="form-control getselectajax2 dtvsplace" name="dtvsplace" data-id="{$id}"  data-table="tvs"  data-celtable="dtvsplace" id="dtvsplace{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  >
        <select  multiple="" class="form-control getselectajax2 dtvsresult" name="dtvsresult" data-id="{$id}"  data-table="dtvs"  data-celtable="dtvsresult" id="dtvsresult{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="dtvs">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>

{else if $tablename == "sis"}
<tr class="rowsis{$id}">    
    <td ><input class="form-control datepicker"  type="text"   name="date" value="{$single->date}"  data-id="{$id}"  data-table="sis"  ></td>
    <td ><select   class="form-control getselectajax2 sisresult" multiple="" name="sisresult" data-id="{$id}"  data-table="sis"  data-celtable="sisresult" id="sisresult{$id}" data-selid="{$id}" >
        </select></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="sis">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>

{else if $tablename == "hsginfertility"}  
<tr class="rowhsg{$id}"> 
    <td width="14%"><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$id}"  data-table="hsginfertility"  ></td>
    <td  width="14%">
        <select   class="form-control getselectajax2 hsgplace" name="hsgplace" data-id="{$id}"  data-table="hsginfertility"  data-celtable="hsgplace" id="hsgplace{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td  width="16%">
        <select   class="form-control getselectajax2 hsgut" name="hsgut" data-id="{$id}"  data-table="hsginfertility"  data-celtable="hsgut" id="hsgut{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%">
        <select  multiple="" class="form-control getselectajax2 hsgrt" name="hsgrt" data-id="{$id}"  data-table="hsginfertility"  data-celtable="hsgrt" id="hsgrt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%">
        <select  multiple="" class="form-control getselectajax2 hsglt" name="hsglt" data-id="{$id}"  data-table="hsginfertility"  data-celtable="hsglt" id="hsglt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="16%">
        <select   class="form-control getselectajax2 hsgpelvis" name="hsgpelvis" data-id="{$id}"  data-table="hsginfertility"  data-celtable="hsgpelvis" id="hsgpelvis{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="hsginfertility">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
{else if $tablename == "hysteroscopyinfertility"}   
<tr class="rowhysteroscopy{$id}">    
    <td width="6%"><input class="form-control datepicker"  type="text" name="date" value="{$single->date}"  data-id="{$id}"  data-table="hysteroscopyinfertility"  ></td>
    <td  width="11%">
        <select   class="form-control getselectajax2 copyplace" name="copyplace" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copyplace" id="copyplace{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td  width="9%">
        <select   class="form-control getselectajax2 copydil" name="copydil" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copydil" id="copydil{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="9%">
        <select   class="form-control getselectajax2 copyintrod" name="copyintrod" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copyintrod" id="copyintrod{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="9%" style="max-width: 33px">
        <select   class="form-control getselectajax2 copycx" multiple="" name="copycx" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copycx" id="copycx{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%" style="max-width: 33px">
        <select   class="form-control getselectajax2 copycavity" multiple="" name="copycavity" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copycavity" id="copycavity{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%">
        <select   class="form-control getselectajax2 copyrostium" name="copyrostium" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copyrostium" id="copyrostium{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%">
        <select   class="form-control getselectajax2 copylostium" name="copylostium" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copylostium" id="copylostium{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="6%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="hysteroscopyinfertility">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowhysteroscopy{$id}">
    <th width="6%">Intervention</th>
    <td  colspan="3"> <input class="form-control"  type="text" name="hysintervention"   data-id="{$id}"  data-table="hysteroscopyinfertility"  ></td>
    <td  width="9%" style="max-width: 33px">
        <select  multiple="" class="form-control getselectajax2 copymcx" name="copymcx" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copymcx" id="copymcx{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%" style="max-width: 33px">
        <select  multiple="" class="form-control getselectajax2 copymcavity" name="copymcavity" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copymcavity" id="copymcavity{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select  multiple="" class="form-control getselectajax2 copymrostium" name="copymrostium" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copymrostium" id="copymrostium{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select  multiple="" class="form-control getselectajax2 copymlostium" name="copymlostium" data-id="{$id}"  data-table="hysteroscopyinfertility"  data-celtable="copymlostium" id="copymlostium{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="6%"><input class="form-control digitsOnly"  type="text" name="coast"   data-id="{$id}"  data-table="hysteroscopyinfertility" placeholder="Cost" ></td>
</tr>
{else if $tablename == "infertilityother"} 
<tr class="rowinfertilityother{$id}">
    <td width="15%"><input class="form-control "  type="text"    name="othername"   data-id="{$id}"  data-table="infertilityother"  ></td>
    <td width="10%"><input class="form-control datepicker"  type="text"    name="otherdate"   data-id="{$id}"  data-table="infertilityother"  ></td>
    <td width="67%"><input class="form-control "  type="text"    name="otherdetail"  data-id="{$id}"  data-table="infertilityother"  ></td>
    <td width="7%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="infertilityother">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>


{else if $tablename == "laparoscopyinfertility"}   
<tr class="rowlaparoscopy{$id}">  
    <td width="6%"><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$id}"  data-table="laparoscopyinfertility"  ></td>
    <td width="9%"><select    class="form-control getselectajax2 laparplace" name="laparplace" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparplace" id="laparplace{$id}" data-selid="{$id}" >
        </select></td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparul" name="laparul" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparul" id="laparul{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparrt" name="laparrt" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparrt" id="laparrt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparlt" name="laparlt" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparlt" id="laparlt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparro" name="laparro" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparro" id="laparro{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparlo" name="laparlo" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparlo" id="laparlo{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparpelvis" name="laparpelvis" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparpelvis" id="laparpelvis{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="6%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="laparoscopyinfertility">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowlaparoscopy{$id}">
    <th width="6%">Intervention</th>
    <td  width="9%"> <input class="form-control"  type="text" name="lapintervention"   data-id="{$id}"  data-table="laparoscopyinfertility"  > </td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmut" name="laparmut" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmut" id="laparmut{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmrt" name="laparmrt" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmrt" id="laparmrt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="9%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmlt" name="laparmlt" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmlt" id="laparmlt{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="20%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmro" name="laparmro" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmro" id="laparmro{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmlo" name="laparmlo" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmlo" id="laparmlo{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 laparmpelvis" name="laparmpelvis" data-id="{$id}"  data-table="laparoscopyinfertility"  data-celtable="laparmpelvis" id="laparmpelvis{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="6%"><input class="form-control digitsOnly"  type="text" name="coast"   data-id="{$id}"  data-table="laparoscopyinfertility" placeholder="Cost" ></td>
</tr>
{else if $tablename == "icsi"}   
<tr class="rowicsi{$id}">   
    <td width="8%"><input class="form-control datepicker"  type="text"   name="date" value="{$single->date}"  data-id="{$id}"  data-table="icsi"   ></td>
    <td  width="13%">
        <input class="form-control "  type="text"   name="icsiplace" value=""  data-id="{$id}"  data-table="icsi"   ></td>
    <!-- <select    class="form-control getselectajax2 icsiplace" name="icsiplace" data-id="{$id}"  data-table="icsi"  data-celtable="icsiplace" id="icsiplace{$id}" data-selid="{$id}" data-new="">
    </select> -->
</td>
<td  width="7%">
    <!-- <select    class="form-control getselectajax2 icsiprotocol" name="icsiprotocol" data-id="{$id}"  data-table="icsi"  data-celtable="icsiprotocol" id="icsiprotocol{$id}" data-selid="{$id}" >
    </select> -->
    <input class="form-control"  type="text"   name="icsiprotocol" value=""  data-id="{$id}"  data-table="icsi"   >
</td>
<td  width="7%" >
    <input type="text"   name="opu" value="{$single->opu}"  data-id="{$id}"  data-table="icsi"  class="form-control digitsOnly" />
</td>
<td  width="10%">
    <input class="form-control"  type="text"   name="icsisemen" value=""  data-id="{$id}"  data-table="icsi"   >
    <!-- <select    class="form-control getselectajax2 icsisemen" name="icsisemen" data-id="{$id}"  data-table="icsi"  data-celtable="icsisemen" id="icsisemen{$id}" data-selid="{$id}" >
    </select> -->
</td>
<td  width="7%" >
    <input type="text"   name="fert"   data-id="{$id}"  data-table="icsi"  class="form-control digitsOnly" />
</td>
<td  width="10%">
    <input type="text"   name="icsiss"  data-id="{$id}"  data-table="icsi"  class="form-control " />
</td>
<td  width="7%" >
    <input type="text"   name="et"   data-id="{$id}"  data-table="icsi"  class="form-control digitsOnly" />
</td>
<td  width="7%" >
    <input type="text"   name="vd"   data-id="{$id}"  data-table="icsi"  class="form-control digitsOnly" />
</td>
<td width="7%"><input class="form-control"  type="text"     name="fr"   data-id="{$id}"  data-table="icsi"  ></td>
<td width="7%"><input class="form-control"  type="text"    name="refr" value="{$single->refr}"  data-id="{$id}"  data-table="icsi"   ></td>
<td  width="10%">
    <input class="form-control "  type="text"   name="e2d2" value=""  data-id="{$id}"  data-table="icsi"   ></td>
</td>
<td  width="10%">
    <input type="text"   name="icsiresult"   data-id="{$id}"  data-table="icsi"  class="form-control" />
    <!-- <select    class="form-control getselectajax2 icsiresult" name="icsiresult" data-id="{$id}"  data-table="icsi"  data-celtable="icsiresult" id="icsiresult{$id}" data-selid="{$id}" >
    </select> -->
</td>
<td width="5%">
    <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="icsi">
        <i class="fa fa-close"></i>
    </a>
</td>
</tr>
{else if $tablename == "folliculom"}  

<tr class="rowfolliculom{$id}">    
    <td width="7%"><input class="form-control datepicker"  type="text"     name="lmp"  data-id="{$id}"  data-table="folliculom"  ></td>
    <td width="7%"><input class="form-control"  type="text"     name="ttt" value="{$single->ttt}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td  width="7%" >
        <input type="text"  name="cd"  data-id="{$id}"  data-table="folliculom"  class="form-control digitsOnly cd" />
    </td>
    <td width="7%"><input class="form-control datepicker"  type="text"     name="date"   data-id="{$id}"  data-table="folliculom"  id="date_{$id}" ></td>
    <td width="7%"><input class="form-control"  type="text"      name="ro" value="{$single->ro}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td width="7%"><input class="form-control"  type="text"     name="lo" value="{$single->lo}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td width="7%"><input class="form-control"  type="text"      name="endo" value="{$single->endo}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td width="7%"><input class="form-control"  type="text"     name="pelvis" value="{$single->pelvis}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td width="7%"><input class="form-control"  type="text"      name="too" value="{$single->too}"  data-id="{$id}"  data-table="folliculom"  ></td>
    <td width="7%"><input class="form-control"  type="text"     name="result" value="{$single->result}"  data-id="{$id}"  data-table="folliculom"   ></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="folliculom">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
{else if $tablename == "operations"}   
<tr class="rowoperations{$id}">
    <td width="7%">{$i}</td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 operation" name="operation" data-id="{$id}"  data-table="operations"  data-celtable="operation" id="operation{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="7%" >
        <input class="form-control datepicker"  type="text"     name="date" id="date_{$id}" data-id="{$id}"  data-table="operations"   >
    </td>
    <td width="7%"><select   class="form-control getselectajax2 place" name="place" data-id="{$id}"  data-table="operations"  data-celtable="place" id="place{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td  width="14%" style="max-width: 33px">
        <select   multiple="" class="form-control getselectajax2 histopath" name="histopath" data-id="{$id}"  data-table="operations"  data-celtable="histopath" id="histopath{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="7%"><input class="form-control digitsOnly"  type="text"     name="cost"   data-id="{$id}"  data-table="operations"   ></td>
    <td width="7%"><input class="form-control"  type="text"      name="note"  data-id="{$id}"  data-table="operations"   ></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="operations">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr> 

{else if $tablename == "newvisit"} 
<tr class="rownewvisit{$id}">
    <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{$id}">
                        <input type="radio" name="usvsdtv{$id}" value="1" 
                               data-id="{$id}" class="usvsdtv" data-table="newvisit"
                               {if $single->usvsdtv eq 1} checked {/if} >US
                        <span></span></label>
                    <label class="mt-radio{$id}">
                        <input type="radio" name="usvsdtv{$id}" value="2"
                               data-id="{$id}" class="usvsdtv" data-table="newvisit"
                               {if $single->usvsdtv eq 2} checked {/if}  >TVS 
                        <span></span></label>
                    <label class="mt-radio{$id}">
                        <input type="radio" name="usvsdtv{$id}" value="3" 
                               data-id="{$id}" class="usvsdtv" data-table="newvisit"
                               {if $single->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>
<tr class="rownewvisit{$id}">    
    <td width="7%"><input class="form-control datepicker"  type="text"   name="date" value="{$today}"  data-id="{$id}"  data-table="newvisit"  ></td>
    <td  width="15%">
        <select    class="form-control getselectajax2 newvisitcycles" name="newvisitcycles" data-id="{$id}"  data-table="newvisit"  data-celtable="newvisitcycles" id="newvisitcycles{$id}" data-selid="{$id}" data-new="">
        </select>
    </td>
    <td width="7%"><input class="form-control datepicker"  type="text"    name="lmp" value="{$single->lmp}"  data-id="{$id}"  data-table="newvisit"  ></td>
    <td width="10%"><input class="form-control"  type="text"     name="bw" value="{$single->bw}"  data-id="{$id}"  data-table="newvisit" ></td>
    <td  style="padding: 0px">
        <table style="width: 100%;margin-bottom: 0px;">
            <tr>
                <td width="10%"><input class="form-control"  type="text"    name="ut" value="{$single->ut}"  data-id="{$id}"  data-table="newvisit"   ></td>
                <td width="10%"><input class="form-control"  type="text"   name="ov" value="{$single->ov}"  data-id="{$id}"  data-table="newvisit"   ></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="infertilitysheet">
                            Add </a>
                    </li>
                    <li>
                        <a href="javascript:;" id="showDrugs" data-controller="infertilitysheet">
                            Show </a>
                    </li>
                </ul>
            </div>
        </div>

    </td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="newvisit">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rownewvisit{$id}"> 
    <th width="10%" colspan="1">Notes</th>
    <td colspan="5"><input class="form-control"  type="text"   name="ttt" value="{$single->ttt}"  data-id="{$id}"  data-table="newvisit"  ></td>
    <td></td>
</tr>

{else}
{/if}


