

{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 " />
    </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 == "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 == "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 width="18%" >
        <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="%5"><input type="text" name="wifeepcw"   data-id="{$id}"  data-table="wifeepc" class="form-control" /></td>
    <td width="20%">
        <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 width="18%">
        <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="15%"><input class="form-control"  type="text"  name="histopath"  data-id="{$id}"  data-table="wifeepc" ></td>
    <td width="5%"><input type="text" name="coast" data-id="{$id}"  data-table="wifeepc" class="form-control " /></td>

    <td width="5%"><input type="text" name="wifeepcp"  data-id="{$id}"  data-table="wifeepc" class="form-control" /></td>
    <td width="5%"><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 == "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="5%" >
        <input class="form-control datepicker"  type="text"     name="date" id="date_{$id}" data-id="{$id}"  data-table="operations"   >
    </td>
    <td width="13%"><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 "  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 == "investigations"} 
<tr class="rowinvestigations{$id}">  
    <th  >Date</th>
    <td ><input class="form-control datepicker"  type="text"  name="invesdhb" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control datepicker"  type="text" name="invesdplat" data-id="{$id}"  data-table="investigations" 
                ></td>
    <td ><input class="form-control datepicker"  type="text"  name="invesdfbs" data-id="{$id}"  data-table="investigations" ></td>
    <td ><input class="form-control datepicker"  type="text"  name="invesdogtt2" data-id="{$id}"  data-table="investigations" ></td>
    <td ><input class="form-control datepicker"  type="text"   name="invesdhbs" data-id="{$id}"  data-table="investigations" ></td>
    <td ><input class="form-control datepicker"  type="text"  name="invesdhcv" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control datepicker"  type="text"   name="invesdcua" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control datepicker"  type="text"  name="invesdferr" data-id="{$id}"  data-table="investigations" ></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="ancsheet">
                            Show </a>
                    </li>
                </ul>
            </div>
        </div></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="investigations">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<tr class="rowinvestigations{$id}">  
    <th  >Result</th>
    <td ><input class="form-control "  type="text"  name="investhb" data-id="{$id}"  data-table="investigations" ></td>
    <td ><input class="form-control "  type="text" name="investplat" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control "  type="text"  name="investfbs" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control "  type="text"  name="invesdogtt" data-id="{$id}"  data-table="investigations"  ></td>
    <td ><input class="form-control"  type="text"   name="investhbs" data-id="{$id}"  data-table="investigations" ></td>
    <td ><input class="form-control "  type="text"  name="investhcv" data-id="{$id}"  data-table="investigations"   ></td>
    <td ><input class="form-control "  type="text"   name="investcua" data-id="{$id}"  data-table="investigations"   ></td>
    <td ><input class="form-control "  type="text"  name="investferr" data-id="{$id}"  data-table="investigations"  ></td>
    <td ></td>
    <td></td>
</tr>


{else if $tablename == "registeration"} 
<tr class="rowregisteration{$id}">
    <td width="7%">{$cregisteration}</td>
    <td width="7%"><select   class="form-control select2me awifep" name="awifep" data-id="{$id}"  data-table="registeration"  data-celtable="awifep" id="awifep{$id}" data-selid="{$id}" >
            <option value="">choose</option>
            {foreach $awifep as $comp}
            <option value="{$comp->id}" >{$comp->name}</option>
            {/foreach}
        </select>
    </td>
    <td width="7%"><select   class="form-control getselectajax2 place2" name="place2" data-id="{$id}"  data-table="registeration"  data-celtable="place2" id="place2{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="7%"><select   class="form-control getselectajax2 origin" name="origin" data-id="{$id}"  data-table="registeration"  data-celtable="origin" id="origin{$id}" data-selid="{$id}" >
        </select>
    </td>
    <!--  <td width="7%"><input class="form-control"  type="text"   name="dplace" data-id="{$id}" data-table="registeration"  value="" ></td> -->
    <!-- <td width="7%"><input class="form-control"  type="text"   name="rplace" data-id="{$id}" data-table="registeration"  value="" ></td> -->

<td width="7%"><select   class="form-control getselectajax2 rplacer" name="rplace" data-id="{$id}"  data-table="registeration"  data-celtable="rplacer" id="rplacer{$id}" data-selid="{$id}" >
                                                </select>
                                            </td>




    <td width="7%"><select   class="form-control getselectajax2 type" name="type" data-id="{$id}"  data-table="registeration"  data-celtable="type" id="type{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td width="7%"><input class="form-control"  type="text"   name="coast" data-id="{$id}" data-table="registeration" ></td>
    <td width="5%">
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="registeration">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>

{else}
<tr class="rowancnewvisit{$id}"> 
    <th width="10%" >Date</th>
    <th width="11%" >W</th>
    <th width="12%" >Bw</th>
    <th width="7%" >BP</th>
    <th  width="50%" >Notes</th>
    <th  width="20%" colspan="2">TTT (Button)</th>
</tr>
<tr class="rowancnewvisit{$id}"> 
    <td ><input class="form-control datepicker vdate2"  type="text"  name="newvisitdate" data-id="{$id}" data-table="ancnewvisit"   value="{$today}"></td>
    <td >
        <label data-id="{$id}" {if $todayc == 1}style="color: red;font-size: 12px;" {else} style="color: maroon; font-weight : bolder; font-size: 12px;" {/if}>{$newvisitw}</label>
        <input class="form-control"  type="hidden"   name="newvisitw" data-id="{$id}" data-table="ancnewvisit" id="newvisitw_{$id}"  value="{$newvisitw}"></td>

    <td ><input class="form-control"  type="text"    name="newvisitbw" data-id="{$id}" data-table="ancnewvisit"  value=""></td>
    <td ><input class="form-control bp_mask"  type="text"   name="newvisitbp" data-id="{$id}" data-table="ancnewvisit" value="" ></td>



    <!-- 
                                     <td ><input class="form-control"  type="text"   name="newvisitnote2" data-id="{$id}" data-table="ancnewvisit"  value="" ></td> -->

    <td ><input class="form-control"  type="text"   name="newvisitnote" data-id="{$id}" data-table="ancnewvisit"  value=""></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="ancsheet">
                            Add </a>
                    </li>
                    <li>
                        <a href="javascript:;" id="showDrugs" data-controller="ancsheet">
                            Show </a>
                    </li>
                </ul>
            </div>
        </div>

    </td>
    <td>
        <a class="btn grey-cascade btn-xs deleterow" data-id="{$id}"  data-table="ancnewvisit">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>


<tr class="rowancnewvisit{$id}"> 
    <th width="10%" >N</th>
    <th width="11%" >EFW</th>
    <th width="23%" colspan="2">Placenta</th>
    <th width="50%"  >Biom - FHR</th>
    <th  width="10%" colspan="2">AF</th>
</tr>
<tr class="rowancnewvisit{$id}"> 
    <td  >
        <select  class="form-control getselectajax2 usn" name="usn" data-id="{$id}"  data-table="ancnewvisit"  data-celtable="usn" id="usn{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td ><input class="form-control "  type="text"   name="usefw" data-id="{$id}" data-table="ancnewvisit"  value=""  ></td>
    <td colspan="2">
        <select  class="form-control getselectajax2 usplace" name="usplace" data-id="{$id}"  data-table="ancnewvisit"  data-celtable="usplace" id="usplace{$id}" data-selid="{$id}" >
        </select>
    </td>
    <td ><input class="form-control"  type="text"    name="usbiom" data-id="{$id}" data-table="ancnewvisit"  value="" ></td>


    <td  colspan="2">
        <select  class="form-control getselectajax2 usaf" name="usaf" data-id="{$id}"  data-table="ancnewvisit"  data-celtable="usaf" id="usaf{$id}" data-selid="{$id}" >
        </select>
    </td>


</tr>
<tr class="rowancnewvisit{$id}">

    <td colspan="7"><input class="form-control"  type="text"   name="plan" data-id="{$id}" data-table="ancnewvisit"  value="" placeholder="plan"></td>

</tr> 
{/if}


