
<!-- 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="page-content all">

        <input type="hidden" id="patientId" value="{$patientid}"/>

        <div class="row ">
            <table class="table table-striped table-bordered table-hover nopdngtbl">
                <tbody><tr class="odd gradeX" style="background: #dfece2">
                <input type="hidden"    id="infertilitysheetid" value="{$id}" >
                <td class="bold">
                    <a data-link="{$hosturl}/controllers/patienthistory.php?ac=show&amp;patientid=1" class="blue gothislinkagnew" data-go="#tab_2_6">    Obst History  </a>
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">G : <span style="color: #000" id="obstg">
                            {$infertilitysheet->obstg}</span > </label> 
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">P : <span style="color: #000" id="obstp">{$infertilitysheet->obstp} </span ></label> 
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">FT : <span style="color: #000" id="obstft">{$infertilitysheet->obstft} </span ></label> 
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">PT : <span style="color: #000" id="obstpt">{$infertilitysheet->obstpt}</span > </label> 
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">EPC : <span style="color: #000" id="obstepc">{$infertilitysheet->obstepc}</span > </label> 
                </td>
                <td class="txtl "> <label class="bold " style="color:  #3598DC;">LIVING : <span style="color: #000" id="obstliving">{$infertilitysheet->obstliving}</span > </label> 
                </td>

                </tr>

                </tbody>
            </table>
        </div>

        <div class="col-md-12" style="padding-right: 0px; padding-left: 0px;">
            <div class="portlet box blue">
                <div class="portlet-title" style="height: 5px">
                    <div class="caption">
                        <i class="fa fa-edit"></i> Infertility Sheet
                    </div>
                    <div class="actions">
                    </div>
                </div>
                <div class="portlet-title" style="text-align: center;">
                    <input class="form-control"  type="text"   name="importantnote" data-id="{$infertilitysheet->id}" data-table="infertilitysheet"  value="{$infertilitysheet->importantnote}" placeholder="Critical Data">
                    <div style="font-size:15px">{$infertilitysheet->importantnotes}</div>
                </div>
                <div class="portlet-body form">
                    <form   class="form-horizontal  emptyform" >
                        <input type="hidden" id="id" name="id" value="{$id}" />
                        <input type="hidden" id="controllname" name="id" value="{$controllname}" />
                        <input type="hidden" id="controllName" name="controllName" value="{$controllname}" />
                        <input type="hidden" id="tablep"  value="infertilitysheet" />
                        <div class="form-body">
                            <h2 style="font-weight: bold"> Infertility Sheet</h2>
                            <hr>
                            <table class="table table-bordered">
                                <tbody>
                                    <tr>
                                        <td width="10%" class="yellow">Type</td>
                                        <td colspan="4" width="40%">
                                            <select  class="form-control getselectajax typeinf" name="sheettype" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="typeinf" id="typeinf{$id}" data-selid="{$id}" >

                                            </select>
                                        </td>
                                        <td  width="10%"  class="yellow">Duration</td>
                                        <td width="10%" >Year</td>
                                        <td  width="10%" >
                                            <input type="text" value="{$infertilitysheet->sheetyear}" name="sheetyear" data-id="{$id}"   data-table="infertilitysheet" class="form-control " />
                                        </td>
                                        <td width="10%">Month</td>
                                        <td width="10%" >
                                            <input type="text"  value="{$infertilitysheet->sheetmonth}" name="sheetmonth" data-id="{$id}" data-table="infertilitysheet" class="form-control " />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <h2 style="font-weight: bold"> husband</h2>
                            <table class="table table-bordered">
                                <tbody>
                                    <tr>
                                        <td width="10%" class="red">Diagnosis</td>
                                        <td width="30%">
                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="husbndiagnosis1"   data-celtable="husbndiagnosis1" id="husbndiagnosis1{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>



                                        </td>
                                        <td width="30%">
                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="husbndiagnosis2"   data-celtable="husbndiagnosis2" id="husbndiagnosis2{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>

                                        </td>
                                        <td width="30%">
                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="husbndiagnosis3"   data-celtable="husbndiagnosis3" id="husbndiagnosis3{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>
                                        </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%">
                                            <select  class="form-control getselectajax sheetlocation" name="sheetlocation" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="sheetlocation" id="sheetlocation{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <th colspan="1" width="10%" >Duration</th>
                                        <td colspan="1" width="10%"><input type="text" data-id="{$id}" name="historyduration" value="{$infertilitysheet->historyduration}" data-table="infertilitysheet" class="form-control"  /></td>
                                        <th colspan="1" width="5%">In</th>
                                        <td colspan="1" width="10%"><input type="text" data-id="{$id}" value="{$infertilitysheet->historyin}" name="historyin" data-table="infertilitysheet" class="form-control" /></td>
                                        <th colspan="1" width="5%">Out</th>
                                        <td colspan="1" width="10%"><input type="text" data-id="{$id}" value="{$infertilitysheet->historyout}" name="historyout" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                    <tr>
                                        <th  colspan="4">Medical History</th>
                                        <th  colspan="6">Surgical History</th>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="medicalhistorydm"   data-celtable="medicalhistorydm" id="medicalhistorydm{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>
                                        </td>
                                        <td  colspan="1"> <input type="text" data-id="{$id}" name="medicalhistorynote" data-table="infertilitysheet" class="form-control" value="{$infertilitysheet->medicalhistorynote}"/></td>
                                        <td  colspan="4">
                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="surgicalhistorydm"   data-celtable="surgicalhistorydm" id="surgicalhistorydm{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>

                                        </td>
                                        <td colspan="2"> <input type="text" value="{$infertilitysheet->surgicalhistorynote}" data-id="{$id}" name="surgicalhistorynote" data-table="infertilitysheet" class="form-control" /></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%"><input type="text" data-id="{$id}" name="examinationgeneral"  data-table="infertilitysheet" value="{$infertilitysheet->examinationgeneral}" class="form-control" /></td>
                                        <td width="40%">

                                            <select multiple=""  class="form-control  getselectajax" data-id="{$id}"  data-table="infertilitysheet"  name="examinationlocalse"   data-celtable="examinationlocalse" id="examinationlocalse{$id}" data-selid="{$id}" data-new="" data-kind="1">
                                            </select>
                                        </td>
                                        <td width="20%"> <input type="text" data-id="{$id}" value="{$infertilitysheet->examinationlocalnote}" name="examinationlocalnote" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="row rowtoggle" >
                                <a class="btn grey-cascade btn-xs toggle"  data-show="investigations" >Investigations</a>
                            </div>
                            <table class="table table-bordered hidetable investigations">
                                <tbody id="semeninfertility">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="15">
                                            <a class="addappend" data-add="semeninfertility" 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%"><input class="form-control datepicker"  type="text"   name="date" data-id="{$single->id}"  data-table="semeninfertility" value="{$single->date}" ></td>
                                        <td colspan="2" width="20%">
                                            <select  class="form-control getselectajax semenplace" name="semenplace" data-id="{$single->id}"  data-table="semeninfertility"  data-celtable="semenplace" id="semenplace{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td colspan="2" width="20%">
                                            <select  class="form-control getselectajax sementype" name="sementype" data-id="{$single->id}"  data-table="semeninfertility"  data-celtable="sementype" id="sementype{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td ><input type="text" name="nc" data-id="{$single->id}"  value="{$single->nc}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="prm" data-id="{$single->id}"  value="{$single->prm}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="tm" data-id="{$single->id}"  value="{$single->tm}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="af" data-id="{$single->id}"  value="{$single->af}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="vit" data-id="{$single->id}"  value="{$single->vit}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="vol" data-id="{$single->id}"  value="{$single->vol}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="tzi" data-id="{$single->id}"  value="{$single->tzi}"data-table="semeninfertility" class="form-control" /></td>
                                        <td ><input type="text" name="sdi" data-id="{$single->id}"  value="{$single->sdi}"data-table="semeninfertility" class="form-control" /></td>
                                        <td>
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="semeninfertility">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations" >
                                <tbody id="semen2">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="15">
                                            <a class="addappend" 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 ><input class="form-control datepicker"  type="text"   value="{$single->detescrotal}" name="detescrotal" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"   value="{$single->detetrue}" name="detetrue" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->detekaryo}"  name="detekaryo" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->deteyqmicro}"  name="deteyqmicro" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->detesdf}"  name="detesdf" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->detesemenfr}"  name="detesemenfr" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->detetese}"  name="detetese" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td ><input class="form-control datepicker"  type="text"  value="{$single->deteother}"  name="deteother" data-id="{$single->id}"  data-table="semen2"   ></td>
                                        <td>
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="semen2">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowsemen2{$single->id}">
                                        <th  >PLace</th>
                                        <td ><input type="text"  name="placescrotal" data-id="{$single->id}" value="{$single->placescrotal}" data-table="semen2"   class="form-control" /></td>
                                        <td ><input type="text"  name="placetrue" data-id="{$single->id}"  value="{$single->placetrue}" data-table="semen2"   class="form-control" /></td>
                                        <td ><input type="text"  name="placekaryo" data-id="{$single->id}"  value="{$single->placekaryo}" data-table="semen2"   class="form-control" /></td>
                                        <td ><input type="text"  name="placeyqmicro" data-id="{$single->id}"  value="{$single->placeyqmicro}" data-table="semen2"   class="form-control" /></td>
                                        <td ><input type="text"  name="placesdf" data-id="{$single->id}"  value="{$single->placesdf}" data-table="semen2"   class="form-control" /></td>
                                        <td >
                                            <select  class="form-control getselectajax semen2placesemenfr" name="semen2placesemenfr" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2placesemenfr" id="semen2placesemenfr{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select  class="form-control getselectajax semen2placetese" name="semen2placetese" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2placetese" id="semen2placetese{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td ><input type="text" name="placeother" data-id="{$single->id}"  data-table="semen2" class="form-control"  value="{$single->placeother}" /></td>
                                        <td>

                                        </td>
                                    </tr>
                                    <tr class="rowsemen2{$single->id}">
                                        <th scope="row" >Result</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax semen2resultscrotal" name="semen2resultscrotal" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2resultscrotal" id="semen2resultscrotal{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select  class="form-control getselectajax semen2resulttrue" name="semen2resulttrue" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2resulttrue" id="semen2resulttrue{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select  class="form-control getselectajax semen2resultkaryo" name="semen2resultkaryo" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2resultkaryo" id="semen2resultkaryo{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select  class="form-control getselectajax semen2resultyqmicro" name="semen2resultyqmicro" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2resultyqmicro" id="semen2resultyqmicro{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select  class="form-control getselectajax semen2resultsdf" name="semen2resultsdf" data-id="{$single->id}"  data-table="semen2"  data-celtable="semen2resultsdf" id="semen2resultsdf{$single->id}" data-selid="{$single->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="{$single->id}"  data-table="semen2" class="form-control" /></td>
                                                    <td ><input type="text" name="resultsemenfrm" value="{$single->resultsemenfrm}" data-id="{$single->id}"  data-table="semen2" class="form-control" /></td>
                                                    <td ><input type="text" name="resultsemenfraf" value="{$single->resultsemenfraf}" data-id="{$single->id}"  data-table="semen2" class="form-control" /></td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td ><input type="text" name="resulttese" value="{$single->resulttese}" data-id="{$single->id}"  data-table="semen2" class="form-control" /></td>
                                        <td ><input type="text" name="resultother" value="{$single->resultother}" data-id="{$single->id}"  data-table="semen2" class="form-control" /></td>
                                        <td>

                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations" >
                                <tbody id="hormonalprofile">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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 ><input class="form-control datepicker" name="datefsh" type="text"  value="{$single->datefsh}"  data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="datelh" type="text"  value="{$single->datelh}"  data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="datett" type="text"  value="{$single->datett}"  data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="dateprl" type="text"   value="{$single->dateprl}" data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="datee2" type="text"   value="{$single->datee2}" data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="dateinhibin" type="text"    data-id="{$single->id}"  data-table="hormonalprofile"  value="{$single->dateinhibin}"></td>
                                        <td ><input class="form-control datepicker" name="dateother" type="text"  value="{$single->dateother}"  data-id="{$single->id}"  data-table="hormonalprofile"  ></td>
                                        <td ><input class="form-control datepicker" name="dateother1" type="text"    data-id="{$single->id}" value="{$single->dateother1}" data-table="hormonalprofile"  ></td>
                                        <td>
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="hormonalprofile">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowhormonalprofile{$single->id}">
                                        <th scope="row" >Result</th>
                                        <td ><input type="text" name="resultfsh"  data-id="{$single->id}" value="{$single->resultfsh}" data-table="hormonalprofile"class="form-control" /></td>
                                        <td ><input type="text" name="resultlh" data-id="{$single->id}"    value="{$single->resultlh}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resulttt"  data-id="{$single->id}"  value="{$single->resulttt}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resultprl"  data-id="{$single->id}" value="{$single->resultprl}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resulte2"  data-id="{$single->id}" value="{$single->resulte2}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resultinhibin" data-id="{$single->id}" value="{$single->resultinhibin}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resultother"  data-id="{$single->id}"  value="{$single->resultother}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td ><input type="text" name="resultother1"  data-id="{$single->id}" value="{$single->resultother1}" data-table="hormonalprofile" class="form-control" /></td>
                                        <td></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered">
                                <tbody>
                                    <tr>
                                        <th class="red">TTT</th>
                                        <td  ><input type="text" data-id="{$id}" value="{$infertilitysheet->sheetttt}" name="sheetttt" data-table="infertilitysheet"  class="form-control" /></td>
                                    </tr>
                                </tbody>
                            </table>
                            <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  >
                                            <select multiple="" class="form-control getselectajax diagnosis" name="diagnosis" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="diagnosis" id="diagnosis{$id}" data-selid="{$id}" >
                                            </select>

                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="row rowtoggle" >
                                <a class="btn grey-cascade btn-xs toggle" data-show="history2" >History</a>
                            </div>
                            <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 >
                                                        <select class="form-control getselectajax menstrualreg" name="menstrualreg" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="menstrualreg" id="menstrualreg{$id}" data-selid="{$id}" >
                                                        </select>
                                                    </td>
                                                    <td width="15%"><input class="form-control bp_mask"  type="text"     data-id="{$id}" value="{$infertilitysheet->wmenstrualcd}" name="wmenstrualcd" data-table="infertilitysheet"  ></td>
                                                    <td >
                                                        <select  class="form-control getselectajax menstrualamount" name="menstrualamount" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="menstrualamount" id="menstrualamount{$id}" data-selid="{$id}" >
                                                        </select>
                                                    </td>
                                                    <td >
                                                        <select  class="form-control getselectajax menstrualdysm" name="menstrualdysm" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="menstrualdysm" id="menstrualdysm{$id}" data-selid="{$id}" >
                                                        </select>
                                                    </td>
                                                    <td width="10%"><input class="form-control datepicker"  type="text"     data-id="{$id}" value="{$infertilitysheet->wmenstruallmp}" name="wmenstruallmp" data-table="infertilitysheet"  ></td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td colspan="1"><input type="text"  data-id="{$id}" value="{$infertilitysheet->wsexual}" name="wsexual" data-table="infertilitysheet"  class="form-control" /></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">
                                            <select multiple="" class="form-control getselectajax medicalhistory" name="medicalhistory" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="medicalhistory" id="medicalhistory{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%"> <input type="text" data-id="{$id}" value="{$infertilitysheet->w2medical}" name="w2medical" data-table="infertilitysheet" class="form-control" /></td>
                                        <td  colspan="1" style="max-width: 30px">
                                            <select multiple="" class="form-control getselectajax surgicalhistory" name="surgicalhistory" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="surgicalhistory" id="surgicalhistory{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%"> <input type="text" data-id="{$id}" value="{$infertilitysheet->wsurgical}" name="wsurgical" data-table="infertilitysheet" class="form-control" /></td>
                                        <td  colspan="1" style="max-width: 30px">
                                            <select multiple="" class="form-control getselectajax familyhistory" name="familyhistory" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="familyhistory" id="familyhistory{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%"> <input type="text" data-id="{$id}" value="{$infertilitysheet->wfamily}" name="wfamily" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                </tbody>
                            </table>

                            <div id="hysteroscopy2"></div>
                            <table class="table table-bordered  hidetable history2" >
                                <tbody id="awifep">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="12">
                                            <a class="addappend" 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%">
                                            <select   class="form-control getselectajax wifesex" name="wifesex" data-id="{$single->id}"  data-table="awifep"  data-celtable="wifesex" id="wifesex{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="5%"><input type="text" name="name" value="{$single->name}"  data-id="{$single->id}"  data-table="awifep"  class="form-control" /></td>


                                        <td width="10%"><input class="form-control datepicker getymt"  type="text"    name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="awifep"   ></td>


                                        <td width="5%" id="awifepmonth_{$single->id}">{$single->wifeage}</td>
                                        <td  width="10%">
                                            <select  class="form-control getselectajax wifemodeofd" name="wifemodeofd" data-id="{$single->id}"  data-table="awifep"  data-celtable="wifemodeofd" id="wifemodeofd{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td   width="10%">
                                            <select   class="form-control getselectajax wifetypeofd" name="wifetypeofd" data-id="{$single->id}"  data-table="awifep"  data-celtable="wifetypeofd" id="wifetypeofd{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="5%" >
                                            <input type="text" name="wifew" value="{$single->wifew}"  data-id="{$single->id}"  data-table="awifep"  class="form-control " />
                                        </td>
                                        <td  width="5%" >
                                            <input type="checkbox"  name="wifel" value="1"
                                                   data-id="{$single->id}"  data-table="awifep"  class="form-control checkbox" {if $single->wifel == 1} checked {/if}>
                                        </td>
                                        <td  width="10%" style="width: 30px">
                                            <select  multiple="" class="form-control getselectajax wifeobst" name="wifeobst" data-id="{$single->id}"  data-table="awifep"  data-celtable="wifeobst" id="wifeobst{$single->id}" data-selid="{$single->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 getselectajax awifeppmethod" name="awifepmethod" data-id="{$single->id}"  data-table="awifep"  data-celtable="awifepmethod" id="awifepmethod{$single->id}" data-selid="{$single->id}" >
                                                        </select>
                                                    </td>
                                                    <td width="33%"><input type="text" name="duration" value="{$single->duration}"  data-id="{$single->id}"  data-table="awifep"  class="form-control" /></td>
                                                    <td width="33%"><input type="text" name="stopped" value="{$single->stopped}"  data-id="{$single->id}"  data-table="awifep"  class="form-control" /></td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="5%"><input type="text" name="comment" value="{$single->comment}"  data-id="{$single->id}"  data-table="awifep"  class="form-control" /></td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="{$single->id}"  data-table="awifep">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable history2" >
                                <tbody id="wifeepc">
                                    <tr>
                                        <td colspan="7" style="background:#fff"  width="80%" class="tdcolor">
                                            <a class="addappend" 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 >p</td>
                                        <td >Epc</td>
                                        <td ></td>
                                    </tr>
                                    {foreach $wifeepc as $single}
                                    <tr class="rowwifeepc{$single->id}">  
                                        <td width="8%"><input type="text" name="wifeepcdate" value="{$single->wifeepcdate}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control datepicker" /></td>
                                        <td >
                                            <select  class="form-control getselectajax wifeepctype" name="wifeepctype" data-id="{$single->id}"  data-table="wifeepc"  data-celtable="wifeepctype" id="wifeepctype{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="4%"><input type="text" name="wifeepcw" value="{$single->wifeepcw}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control" /></td>
                                        <td width="20%">
                                            <select  class="form-control getselectajax wifeepcttt" name="wifeepcttt" data-id="{$single->id}"  data-table="wifeepc"  data-celtable="wifeepcttt" id="wifeepcttt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td >
                                            <select   class="form-control getselectajax wifeepcobst" name="wifeepcobst" data-id="{$single->id}"  data-table="wifeepc"  data-celtable="wifeepcobst" id="wifeepcobst{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="10%"><input class="form-control"  type="text"  name="histopath" value="{$single->histopath}"  data-id="{$single->id}"  data-table="wifeepc" ></td>
                                        <td width="5%"><input type="text" name="coast" value="{$single->coast}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control " /></td>
                                        <td width="4%"><input type="text" name="wifeepcp" value="{$single->wifeepcp}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control" /></td>
                                        <td width="4%"><input type="text" name="wifeepcepc" value="{$single->wifeepcepc}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control" /></td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="{$single->id}"  data-table="wifeepc">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowwifeepc{$single->id}">  
                                        <td colspan="10"><input type="text" name="wifeepnots" value="{$single->wifeepnots}"  data-id="{$single->id}"  data-table="wifeepc" class="form-control "  placeholder="Note" /></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <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"> <input type="text" value="{$infertilitysheet->generalbw}" name="generalbw" data-id="{$id}" data-table="infertilitysheet" class="form-control" /></td>
                                        <td  colspan="1" width="10%">Vulva</td>
                                        <td  colspan="1" style="max-width: 33px">
                                            <select multiple="" class="form-control getselectajax localvulva" name="localvulva" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="localvulva" id="localvulva{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td  colspan="1" width="10%">BMI </td>
                                        <td  colspan="1"> <input type="text" value="{$infertilitysheet->generalbmi}" name="generalbmi" data-id="{$id}" data-table="infertilitysheet" class="form-control" /></td>
                                        <td  colspan="1" width="10%">Vagina</td>
                                        <td  colspan="1" style="max-width: 33px">
                                            <select multiple="" class="form-control getselectajax localvagina" name="localvagina" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="localvagina" id="localvagina{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td  colspan="1" width="10%"> Breast</td>
                                        <td  colspan="1">
                                            <select  class="form-control getselectajax generalbreast" multiple name="generalbreast" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="generalbreast" id="generalbreast{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%">CX</td>
                                        <td  colspan="1" style="max-width: 33px">
                                            <select multiple="" class="form-control getselectajax localcx" name="localcx" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="localcx" id="localcx{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td  colspan="1" width="10%">Hirsutism </td>
                                        <td  colspan="1">
                                            <select  class="form-control getselectajax generalhirsutism" name="generalhirsutism" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="generalhirsutism" id="generalhirsutism{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%">Other</td>
                                        <td  colspan="1"> <input type="text" value="{$infertilitysheet->localother}" name="localother" data-id="{$id}" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                    <tr>
                                        <td  colspan="1" width="10%"> Thyroid</td>
                                        <td  colspan="1">
                                            <select  class="form-control getselectajax generalthyroid" name="generalthyroid" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="generalthyroid" id="generalthyroid{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  colspan="1" width="10%">Other</td>
                                        <td  colspan="1"> <input type="text" value="{$infertilitysheet->localother1}" name="localother1" data-id="{$id}" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="row rowtoggle" >
                                <a class="btn grey-cascade btn-xs toggle " data-show="investigations2" >Investigations</a>
                            </div>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="hormonalprofile2">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="15">
                                            <a class="addappend" 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 ><input class="form-control datepicker"  type="text" name="dateamh" value="{$single->dateamh}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"   name="datetsh" value="{$single->datetsh}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="dateprl" value="{$single->dateprl}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="datefsh" value="{$single->datefsh}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="datelh" value="{$single->datelh}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="datee2" value="{$single->datee2}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="datep4" value="{$single->datep4}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td ><input class="form-control datepicker"  type="text"    name="dateother" value="{$single->dateother}"  data-id="{$single->id}"  data-table="hormonalprofile2"  ></td>
                                        <td>
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="hormonalprofile2">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowhormonalprofile2{$single->id}">
                                        <th scope="row" >Result</th>
                                        <td ><input type="text" name="resultamh" value="{$single->resultamh}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resulttsh" value="{$single->resulttsh}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resultprl" value="{$single->resultprl}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resultfsh" value="{$single->resultfsh}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resultlh" value="{$single->resultlh}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resulte2" value="{$single->resulte2}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resultp4" value="{$single->resultp4}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td ><input type="text" name="resultother" value="{$single->resultother}"  data-id="{$single->id}"  data-table="hormonalprofile2" class="form-control" /></td>
                                        <td></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="tvs">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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 ><input class="form-control datepicker"  type="text"    name="comment" value="{$single->comment}"  data-id="{$single->id}"  data-table="tvs"  ></td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="tvs">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowtvs{$single->id}"> 
                                        <th width="15%" >UT</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax tvsut" name="tvsut" data-id="{$single->id}"  data-table="tvs"  data-celtable="tvsut" id="tvsut{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr class="rowtvs{$single->id}"> 
                                        <th width="15%" >CX</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax tvscx" name="tvscx" data-id="{$single->id}"  data-table="tvs"  data-celtable="tvscx" id="tvscx{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr class="rowtvs{$single->id}"> 
                                        <th width="15%" >RO</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax tvsro" name="tvsro" data-id="{$single->id}"  data-table="tvs"  data-celtable="tvsro" id="tvsro{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr class="rowtvs{$single->id}"> 
                                        <th width="15%" >LO</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax tvslo" name="tvslo" data-id="{$single->id}"  data-table="tvs"  data-celtable="tvslo" id="tvslo{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr class="rowtvs{$single->id}"> 
                                        <th width="15%" >Pelvis</th>
                                        <td >
                                            <select  multiple="" class="form-control getselectajax tvspelvis" name="tvspelvis" data-id="{$single->id}"  data-table="tvs"  data-celtable="tvspelvis" id="tvspelvis{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="dtvs">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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 ><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="dtvs" ></td>
                                        <td  >
                                            <select  multiple="" class="form-control getselectajax dtvsplace" name="dtvsplace" data-id="{$single->id}"  data-table="dtvs"  data-celtable="dtvsplace" id="dtvsplace{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  >
                                            <select  multiple="" class="form-control getselectajax dtvsresult" name="dtvsresult" data-id="{$single->id}"  data-table="dtvs"  data-celtable="dtvsresult" id="dtvsresult{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="dtvs">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="sis">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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 ><input class="form-control datepicker"  type="text"   name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="sis"  ></td>
                                        <td > <select   class="form-control getselectajax sisresult" multiple="" name="sisresult" data-id="{$single->id}"  data-table="sis"  data-celtable="sisresult" id="sisresult{$single->id}" data-selid="{$single->id}" >
                                            </select>


                                        </td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="sis">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="hsginfertility">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" data-add="hsginfertility" 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="rowhsginfertility{$single->id}">
                                        <td width="14%"><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="hsginfertility"  ></td>
                                        <td  width="14%">
                                            <select   class="form-control getselectajax hsgplace" name="hsgplace" data-id="{$single->id}"  data-table="hsginfertility"  data-celtable="hsgplace" id="hsgplace{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="16%">
                                            <select   class="form-control getselectajax hsgut" name="hsgut" data-id="{$single->id}"  data-table="hsginfertility"  data-celtable="hsgut" id="hsgut{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%">
                                            <select  multiple="" class="form-control getselectajax hsgrt" name="hsgrt" data-id="{$single->id}"  data-table="hsginfertility"  data-celtable="hsgrt" id="hsgrt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%">
                                            <select  multiple="" class="form-control getselectajax hsglt" name="hsglt" data-id="{$single->id}"  data-table="hsginfertility"  data-celtable="hsglt" id="hsglt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="16%">
                                            <select   class="form-control getselectajax hsgpelvis" name="hsgpelvis" data-id="{$single->id}"  data-table="hsginfertility"  data-celtable="hsgpelvis" id="hsgpelvis{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="hsginfertility">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="hysteroscopyinfertility">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" data-add="hysteroscopyinfertility" 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="rowhysteroscopyinfertility{$single->id}">
                                        <td width="6%"><input class="form-control datepicker"  type="text" name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="hysteroscopyinfertility"  ></td>
                                        <td  width="11%">
                                            <select   class="form-control getselectajax copyplace" name="copyplace" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copyplace" id="copyplace{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%">
                                            <select   class="form-control getselectajax copydil" name="copydil" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copydil" id="copydil{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%">
                                            <select   class="form-control getselectajax copyintrod" name="copyintrod" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copyintrod" id="copyintrod{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select    class="form-control getselectajax copycx" multiple="" name="copycx" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copycx" id="copycx{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%" style="max-width: 33px">
                                            <select    class="form-control getselectajax copycavity" multiple="" name="copycavity" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copycavity" id="copycavity{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%">
                                            <select   class="form-control getselectajax copyrostium" name="copyrostium" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copyrostium" id="copyrostium{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="13%">
                                            <select   class="form-control getselectajax copylostium" name="copylostium" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copylostium" id="copylostium{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="6%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="hysteroscopyinfertility">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowhysteroscopyinfertility{$single->id}">
                                        <th width="6%">Intervention</th>
                                        <td  colspan="3"><input class="form-control"  type="text" name="hysintervention" value="{$single->hysintervention}"  data-id="{$single->id}"  data-table="hysteroscopyinfertility"  >
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax copymcx" name="copymcx" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copymcx" id="copymcx{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%" style="max-width: 33px">
                                            <select     multiple="" class="form-control getselectajax copymcavity" name="copymcavity" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copymcavity" id="copymcavity{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax copymrostium" name="copymrostium" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copymrostium" id="copymrostium{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="13%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax copymlostium" name="copymlostium" data-id="{$single->id}"  data-table="hysteroscopyinfertility"  data-celtable="copymlostium" id="copymlostium{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="6%"><input class="form-control "  type="text" name="coast" value="{$single->coast}"  data-id="{$single->id}"  data-table="hysteroscopyinfertility"  placeholder="Cost"></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="laparoscopyinfertility">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" data-add="laparoscopyinfertility" 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="rowlaparoscopyinfertility{$single->id}">
                                        <td width="6%"><input class="form-control datepicker"  type="text"    name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="laparoscopyinfertility"  ></td>
                                        <td width="9%"><select   class="form-control getselectajax laparplace" name="laparplace" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparplace" id="laparplace{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparul" name="laparul" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparul" id="laparul{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparrt" name="laparrt" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparrt" id="laparrt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparlt" name="laparlt" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparlt" id="laparlt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparro" name="laparro" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparro" id="laparro{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparlo" name="laparlo" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparlo" id="laparlo{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparpelvis" name="laparpelvis" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparpelvis" id="laparpelvis{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="6%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="laparoscopyinfertility">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rowlaparoscopyinfertility{$single->id}">
                                        <th width="6%">Intervention</th>
                                        <td  width="9%"> <input class="form-control"  type="text" name="lapintervention" value="{$single->lapintervention}"  data-id="{$single->id}"  data-table="laparoscopyinfertility"  ></td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmut" name="laparmut" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmut" id="laparmut{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmrt" name="laparmrt" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmrt" id="laparmrt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="9%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmlt" name="laparmlt" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmlt" id="laparmlt{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="20%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmro" name="laparmro" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmro" id="laparmro{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmlo" name="laparmlo" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmlo" id="laparmlo{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax laparmpelvis" name="laparmpelvis" data-id="{$single->id}"  data-table="laparoscopyinfertility"  data-celtable="laparmpelvis" id="laparmpelvis{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="6%"><input class="form-control "  type="text" name="coast" value="{$single->coast}"  data-id="{$single->id}"  data-table="laparoscopyinfertility" placeholder="Cost" ></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered hidetable investigations2" >
                                <tbody id="infertilityother">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" data-add="infertilityother" data-id="{$id}"  data-table="infertilitysheetid">  Other</a>
                                        </th>
                                    </tr>
                                    <tr>
                                        <th  colspan="1">Name </th>
                                        <th  colspan="1">Date</th>
                                        <th  colspan="1">Details</th>
                                        <th  colspan=""></th>
                                    </tr>
                                    {foreach $infertilityother as $single}
                                    <tr class="rowinfertilityother{$single->id}">
                                        <td width="15%"><input class="form-control "  type="text"    name="othername" value="{$single->othername}"  data-id="{$single->id}"  data-table="infertilityother"  ></td>
                                        <td width="10%"><input class="form-control datepicker"  type="text"    name="otherdate" value="{$single->otherdate}"  data-id="{$single->id}"  data-table="infertilityother"  ></td>
                                        <td width="67%"><input class="form-control "  type="text"    name="otherdetail" value="{$single->otherdetail}"  data-id="{$single->id}"  data-table="infertilityother"  ></td>
                                        <td width="7%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="infertilityother">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>

                                    {/foreach}
                                </tbody>
                            </table>
                            <!-- <table class="table table-bordered hidetable investigations2" >
                                <tbody>
                                    <tr>
                                        <td class="colorred">Other</td>
                                        <td  ><input type="text"  data-id="{$id}" name="sheetother" value="{$infertilitysheet->sheetother}" data-table="infertilitysheet" class="form-control" /></td>
                                    </tr>
                                </tbody>
                            </table> -->
                            <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="infertilitysheet">
                                                                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  >
                                            <select  class="form-control getselectajax tttda" name="tttda" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="tttda" id="tttda{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  >
                                            <select  class="form-control getselectajax tttmetformin" name="tttmetformin" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="tttmetformin" id="tttmetformin{$id}" data-selid="{$id}" >
                                            </select>
                                        </td>
                                        <td  style="padding: 0px">
                                            <table style="width: 100%;margin-bottom: 0px;">
                                                <tr>
                                                    <td style=" max-width: 7px !important;" >
                                                        <select multiple="" class="form-control getselectajax ttttype" name="ttttype" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="ttttype" id="ttttype{$id}" data-selid="{$id}" >
                                                        </select>
                                                    </td>
                                                    <td  >
                                                        <select  class="form-control getselectajax tttresponse" name="tttresponse" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="tttresponse" id="tttresponse{$id}" data-selid="{$id}" >
                                                        </select>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td  style="padding: 0px">
                                            <table style="width: 100%;margin-bottom: 0px;">
                                                <tr>
                                                    <td  width="9%"> <input type="text" data-id="{$id}" name="sheettrials" value="{$infertilitysheet->sheettrials}" data-table="infertilitysheet" class="form-control " /></td>
                                                    <td  width="9%"> <input type="text" data-id="{$id}" name="sheetdate" value="{$infertilitysheet->sheetdate}" data-table="infertilitysheet" class="form-control datepicker" /></td>
                                                    <td   width="9%"> <input type="text" data-id="{$id}" name="sheetresult" value="{$infertilitysheet->sheetresult}" data-table="infertilitysheet" class="form-control" /></td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <table class="table table-bordered  ttt" >
                                <tbody id="icsi">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="15">
                                            <a  class="addappend" 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">E2d2</th>
                                        <th  colspan="1">Result</th>
                                        <th  colspan=""></th>
                                    </tr>
                                    {foreach $icsi as $single}
                                    <tr class="rowicsi{$single->id}">
                                        <td width="8%"><input class="form-control datepicker"  type="text"   name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="icsi"   ></td>
                                        <td  width="13%">
                                            <input class="form-control "  type="text"   name="icsiplace" value="{$single->icsiplace}"  data-id="{$single->id}"  data-table="icsi"   ></td>

                                        <!-- select    class="form-control getselectajax icsiplace" name="icsiplace" data-id="{$single->id}"  data-table="icsi"  data-celtable="icsiplace" id="icsiplace{$single->id}" data-selid="{$single->id}" >
                                        </select> -->
                                        </td>
                                        <td  width="7%">
                                            <input class="form-control"  type="text"   name="icsiprotocol" value="{$single->icsiprotocol}"  data-id="{$single->id}"  data-table="icsi"   >
                                            <!-- <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%" >

                                            <input type="text"   name="opu" value="{$single->opu}"  data-id="{$single->id}"  data-table="icsi"  class="form-control " />
                                        </td>
                                        <td  width="10%">
                                            <input class="form-control"  type="text"   name="icsisemen" value="{$single->icsisemen}"  data-id="{$single->id}"  data-table="icsi"   >

                                            <!-- <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%" >
                                            <input type="text"   name="fert" value="{$single->fert}"  data-id="{$single->id}"  data-table="icsi"  class="form-control " />
                                        </td>
                                        <td  width="10%">
                                            <input type="text"   name="icsiss" value="{$single->icsiss}"  data-id="{$single->id}"  data-table="icsi"  class="form-control " />

                                        </td>
                                        <td  width="7%" >
                                            <input type="text"   name="et" value="{$single->et}"  data-id="{$single->id}"  data-table="icsi"  class="form-control " />
                                        </td>
                                        <td  width="7%" >
                                            <input type="text"   name="vd" value="{$single->vd}"  data-id="{$single->id}"  data-table="icsi"  class="form-control " />
                                        </td>
                                        <td width="7%"><input class="form-control"  type="text"     name="fr" value="{$single->fr}"  data-id="{$single->id}"  data-table="icsi"  ></td>
                                        <td width="7%"><input class="form-control"  type="text"    name="refr" value="{$single->refr}"  data-id="{$single->id}"  data-table="icsi"   ></td>
                                        <td  width="10%">
                                            <input class="form-control "  type="text"   name="e2d2" value="{$single->e2d2}"  data-id="{$single->id}"  data-table="icsi"   ></td>


                                        </td>
                                        <td  width="10%">
                                            <input type="text"   name="icsiresult" value="{$single->icsiresult}"  data-id="{$single->id}"  data-table="icsi"  class="form-control" />
                                            <!-- <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%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="icsi">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered  ttt" >
                                <tbody id="folliculom">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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%"><input class="form-control datepicker" id="lmp_{$single->id}"  type="text"     name="lmp" value="{$single->lmp}"  data-id="{$single->id}"  data-table="folliculom"  ></td>
                                        <td width="7%"><input class="form-control"  type="text"     name="ttt" value="{$single->ttt}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td  width="7%" >
                                            <input type="text"  name="cd" value="{$single->cd}"  data-id="{$single->id}" id="cd_{$single->id}"  data-table="folliculom"  class="form-control  cd" />
                                        </td>
                                        <td width="7%"><input class="form-control datepicker"  type="text"     name="date" value="{$single->date}" id="date_{$single->id}" data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"      name="ro" value="{$single->ro}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"     name="lo" value="{$single->lo}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"      name="endo" value="{$single->endo}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"     name="pelvis" value="{$single->pelvis}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"      name="too" value="{$single->too}"  data-id="{$single->id}"  data-table="folliculom"  ></td>
                                        <td width="7%"><input class="form-control"  type="text"     name="result" value="{$single->result}"  data-id="{$single->id}"  data-table="folliculom"   ></td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="folliculom">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                            <table class="table table-bordered  ttt" >
                                <tbody id="operations">
                                    <tr>
                                        <th scope="row" class="thhead" colspan="14">
                                            <a class="addappend" 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">notes</th>
                                        <th  colspan="1"></th>
                                    </tr>
                                    {assign var="i" value="1"}
                                    {foreach $operations as $single}
                                    <tr class="rowoperations{$single->id}">
                                        <td width="2%">{$i}</td>
                                        <td  width="14%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax operation" name="operation" data-id="{$single->id}"  data-table="operations"  data-celtable="operation" id="operation{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="5%" >
                                            <input class="form-control datepicker"  type="text"     name="date" value="{$single->date}" id="date_{$single->id}" data-id="{$single->id}"  data-table="operations"   >
                                        </td>
                                        <td width="13%"><select   class="form-control getselectajax place" name="place" data-id="{$single->id}"  data-table="operations"  data-celtable="place" id="place{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td  width="12%" style="max-width: 33px">
                                            <select   multiple="" class="form-control getselectajax histopath" name="histopath" data-id="{$single->id}"  data-table="operations"  data-celtable="histopath" id="histopath{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="5%"><input class="form-control "  type="text"     name="cost" value="{$single->cost}"  data-id="{$single->id}"  data-table="operations"   ></td>
                                        <td width="7%"><input class="form-control"  type="text"      name="note" value="{$single->note}"  data-id="{$single->id}"  data-table="operations"   ></td>
                                        <td width="5%">
                                            <a class="btn grey-cascade btn-xs deleterow" data-id="{$single->id}"  data-table="operations">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    {assign var="i" value=$i+1}
                                    {/foreach}
                                </tbody>
                            </table>
                            <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 >
                                            <select  class="form-control getselectajax sheethusband" multiple="" name="sheethusband" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="sheethusband" id="sheethusband{$id}" data-selid="{$id}" >

                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th  width="15%">Wife</th>
                                        <td > <select  class="form-control getselectajax sheetwife" multiple="" name="sheetwife" data-id="{$id}"  data-table="infertilitysheet"  data-celtable="sheetwife" id="sheetwife{$id}" data-selid="{$id}" >

                                            </select>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <table class="table table-bordered">
                                <tbody id="newvisit" >
                                    <tr>
                                        <th style="background:#19ae19" colspan="14"> 
                                            <a   class="addappend" data-add="newvisit" data-id="{$id}"  data-table="infertilitysheetid" style="color: #fff" > New Visit </a> </th>
                                    </tr>
                                    {foreach $newvisit as $single}
                                    <tr class="rownewvisit{$single->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{$single->id}">
                                                            <input type="radio" name="usvsdtv{$single->id}" value="1" 
                                                                   data-id="{$single->id}" class="usvsdtv dontSave" data-table="newvisit"
                                                                   {if $single->usvsdtv eq 1} checked {/if} >US
                                                            <span></span></label>
                                                        <label class="mt-radio{$single->id}">
                                                            <input type="radio" name="usvsdtv{$single->id}" value="2"
                                                                   data-id="{$single->id}" class="usvsdtv dontSave" data-table="newvisit"
                                                                   {if $single->usvsdtv eq 2} checked {/if}  >TVS 
                                                            <span></span></label>
                                                        <label class="mt-radio{$single->id}">
                                                            <input type="radio" name="usvsdtv{$single->id}" value="3" 
                                                                   data-id="{$single->id}" class="usvsdtv dontSave" 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{$single->id}">
                                        <td width="7%"><input class="form-control datepicker"  type="text"   name="date" value="{$single->date}"  data-id="{$single->id}"  data-table="newvisit"  ></td>
                                        <td  width="15%">
                                            <select    class="form-control getselectajax newvisitcycles" name="newvisitcycles" data-id="{$single->id}"  data-table="newvisit"  data-celtable="newvisitcycles" id="newvisitcycles{$single->id}" data-selid="{$single->id}" >
                                            </select>
                                        </td>
                                        <td width="7%"><input class="form-control datepicker"  type="text"    name="lmp" value="{$single->lmp}"  data-id="{$single->id}"  data-table="newvisit"  ></td>
                                        <td width="10%"><input class="form-control"  type="text"     name="bw" value="{$single->bw}"  data-id="{$single->id}"  data-table="newvisit" ></td>
                                        <td  style="padding: 0px">
                                            <table style="width: 100%;margin-bottom: 0px;">
                                                <tr>
                                                    <td width="9%"><input class="form-control"  type="text"    name="ut" value="{$single->ut}"  data-id="{$single->id}"  data-table="newvisit"   ></td>
                                                    <td width="10%"><input class="form-control"  type="text"   name="ov" value="{$single->ov}"  data-id="{$single->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="{$single->id}"  data-table="newvisit">
                                                <i class="fa fa-close"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <tr class="rownewvisit{$single->id}">
                                        <th width="10%" colspan="1">Notes</th>
                                        <td colspan="5"><input class="form-control"  type="text"   name="ttt" value="{$single->ttt}"  data-id="{$single->id}"  data-table="newvisit"  ></td>
                                        <td></td>
                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>



                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<div class="all">   

    <!---------------------------------------------------------------------------add Drugs Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientDrugs" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close closeDrug" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaDrugs" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title" >
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " id="presDate" name="presDate" value="{$presDate}" data-controller="infertilitysheet"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>
                                            <div class="actions">
                                                <a href="javascript:;" class="btn btn-default btn-sm" id="addNewDrugRow" data-tableName="infertilitysheetdrugs">
                                                    <i class="fa fa-plus"></i> Add </a>
                                                <a href="javascript:;" class="btn btn-default btn-sm" id="addNewDrugInTable">
                                                    <i class="fa fa-plus"></i> Add New Drug </a>
                                            </div>
                                            <div id="husbandFor">
                                                <label class="bold" style="font-size: 16px;">Husband <input type="checkbox" id="forHusband" name="forHusband"  value="1" data-controller="infertilitysheet"></label>
                                            </div>
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Print Date <input type="text" class="form-control datepicker " data-controller="infertilitysheet"  id="printDate" name="printDate" value="{$presDate}"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>
                                        </div>

                                        <div class="portlet-body  scroll_y showNum isheight">

                                            <table class="table table-striped table-hover table-bordered" id="pre_table" >
                                                <thead>
                                                    <tr>
                                                        <th class="col-md-2">
                                                            Group
                                                        </th>
                                                        <th class="col-md-2">
                                                            Drug
                                                        </th>
                                                        <th class="col-md-2">
                                                            Form
                                                        </th>
                                                        <th class="col-md-5">
                                                            Use
                                                        </th>

                                                        <th >
                                                            Delete
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody id="drugContent">

                                                    <tr style="display: none"><td colspan="5" ><input type="hidden" id="drugItr" value="{$preItr}" name="drugItr"/></td></tr>
                                                    {assign var=itr value=1}
                                                    {foreach $PatientPresByDate as $pre}
                                                    <tr>
                                                        <td>
                                                            <select class="form-control xx dcat select2me" id="dcat{$itr}" name="dcat{$itr}"  data-itr="{$itr}"  data-placeholder="Select..."  >
                                                                <option value="" {if $pre->drugcat == ""}selected{/if}>Choose Category</option>
                                                                {foreach $allDrugcats as $cat}
                                                                <option value="{$cat['drugcat']}" {if $pre->drugcat == $cat['drugcat'] }selected{/if}>{$cat['drugcat']}</option>
                                                                {/foreach}
                                                                <option value="" {if $pre->drugcat == ""}selected{/if}>Choose Category</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control xx dname select2me updateElement" id="dname{$itr}" data-id="{$pre->id}" data-colName="drugid" data-tableName="infertilitysheetdrugs" data-itr="{$itr}" data-placeholder="Select..."  >
                                                                <option value="" {if $pre->drugid == ""}selected{/if}>Choose Drug</option>
                                                                {foreach $drugs as $drug}
                                                                <option value="{$drug['id']}" {if $pre->drugid == $drug['id'] }selected{/if}>{$drug['drugname']} {if $ProgramesettingData->visitsform eq 3}(left {$drug['currentbalance']}){/if}</option>
                                                                {/foreach}
                                                                <option value="" {if $pre->drugid == ""}selected{/if}>Choose Drug</option>
                                                            </select>

                                                        </td>
                                                        <td>
                                                            <select class="form-control xx dtype select2me updateElement" id="dtype{$itr}" data-id="{$pre->id}" data-colName="drugtype" data-tableName="infertilitysheetdrugs" data-itr="{$itr}" data-placeholder="Select..."  >
                                                                <option value="" {if $pre->drugtype == ""}selected{/if}>Choose Form</option>
                                                                {foreach $allDrugTypes as $type}
                                                                <option value="{$type['drugtype']}" {if $pre->drugtype == $type['drugtype'] }selected{/if}>{$type['drugtype']}</option>
                                                                {/foreach}
                                                                <option value="" {if $pre->drugtype == ""}selected{/if}>Choose Form</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control xx select2me updateElement" id="ddos{$itr}" data-id="{$pre->id}" data-colName="drugdos" data-tableName="infertilitysheetdrugs" data-itr="{$itr}" data-placeholder="Select..."  >
                                                                <option value="" {if $pre->drugdos == ""}selected{/if}>choose dose </option>
                                                                {foreach $allDrugDoses as $dos}
                                                                <option value="{$dos['drugdos']}" {if $pre->drugdos == $dos['drugdos'] }selected{/if}>{$dos['drugdos']}</option>
                                                                {/foreach}
                                                                <option value="" {if $pre->drugdos == ""}selected{/if}>choose dose </option>
                                                            </select>
                                                        </td>

                                                        <td>
                                                            <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$pre->id}" style=" float: left;" href="#" data-link="infertilitysheet" data-fn="addprescription">
                                                                <i class="fa fa-close"></i>
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    {capture assign=itr}{$itr+1}{/capture}
                                                    {/foreach}

                                                </tbody>
                                            </table>
                                            <!--<div class="md-checkbox" id="husbandFor">
                                                <input type="checkbox" id="forHusband" name="forHusband"  class="md-check" value="1" data-controller="infertilitysheet">
                                                <label for="forHusband" class="bold">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Make this for Husband </label>
                                            </div>-->

                                            <input type="hidden" id="pId" value="" name="patientId"/>
                                            <input type="hidden" id="preType" value="" name="preType"/>
                                            <input type="hidden" id="preFor" value="" name="preFor"/>

                                            <div id="drugPrint">

                                            </div>

                                        </div>

                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn default printPre"  data-type="add" data-controller="infertilitysheet"> Print  </button>
                                    <button type="button" class="btn default closeDrug" id="closemodel" data-dismiss="modal"> Close</button>

                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!---------------------------------------------------------------------------show Drugs Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showPatientDrugs" style="min-width:1000px;z-index: 10049;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <div class="portlet-title" >
                                        <div class="caption"> Prescriptions </div>
                                    </div>
                                    <div class="portlet-body" id="showPrescriptions">

                                        <table class="table table-striped table-hover table-bordered">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        Date
                                                    </th>
                                                    <th>
                                                        Drug Name
                                                    </th>

                                                    <th>
                                                        Edit
                                                    </th>
                                                    <th>
                                                        Print
                                                    </th>
                                                    <th>
                                                        {if $ProgramesettingData->displaydoctorname eq 1} Doctor{/if}
                                                    </th>
                                                </tr>
                                            </thead>

                                        </table>

                                    </div>
                                    <div id="drugPrintShow">

                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">

                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--------------------------------------------------------------------------- add Investigation Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientInvestigation" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds95">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaInvest" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title">
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " id="invDate" name="invDate" value="{$presDate}"  readonly="" placeholder="Date" style="display: inline; width: 62%"> </div>
                                            <div class="actions">
                                                <button type="button" class="btn default printInvestigation" data-print ="0" data-controller="infertilitysheet"> Save </button>
                                                <button type="button" class="btn default printInvestigation" data-print ="1" data-controller="infertilitysheet"> Save and Print  </button>
                                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>
                                            </div>
                                            <label class="husbandx">
                                                <span>  Husband
                                                    <input type="checkbox" id="forHusbandInv" name="forHusband"  value="1" style="padding: 4px 10px;">
                                                </span>
                                            </label>
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Print Date <input type="text" class="form-control datepicker " data-controller="infertilitysheet"  id="printInvDate" name="printInvDate" value="{$presDate}"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>

                                        </div>
                                        <div class="portlet-body">
                                            <input type="hidden" id="pId1" value="" name="patientId"/>
                                            <div class="row" style="padding-left: 9px;padding-top:5px;overflow-y: scroll;">
                                                <div class="wds20 fleft">
                                                    {assign var=i value=1}
                                                    {foreach $group1 as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin {$cat->id}Check" id="" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </div>
                                                <div class="wds20 fleft">
                                                    {assign var=i value=1}
                                                    {foreach $group2 as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin {$cat->id}Check" id="" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </div>
                                                <div class="wds20 fleft">
                                                    {assign var=i value=1}
                                                    {foreach $group3 as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" id="" class="iiin {$cat->id}Check"  value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </div>
                                                <div class="wds20 fleft">
                                                    {assign var=i value=1}
                                                    {foreach $group4 as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" id="" class="iiin {if $cat->name == 'Male(Husband)'}husbandCheck{/if} {$cat->id}Check" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </div>

                                                <div class="wds20 fleft">
                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1">  Favorites
                                                        <span>
                                                            <input type="checkbox" data-gClass="favoriteCheck" class="iiin checkGroup">
                                                        </span>

                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $favorites as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="favoriteCheck iiin" id="" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>

                                                    {foreach $others  as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="{$cat->id}Check iiin" id="" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}

                                                    {assign var=i value=1}
                                                    {foreach $group5 as $cat}

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> {$cat->name}
                                                        <span>
                                                            <input type="checkbox" data-gClass="{$cat->id}Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        {assign var=j value=1}
                                                        {foreach $cat->invests as $inv}
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin {$cat->id}Check" id="" value="{$inv->id}" name="invCheck[]">
                                                            </span> {$inv->name}
                                                        </label>

                                                        {capture assign=j}{$j+1}{/capture}
                                                        {/foreach}
                                                    </div>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </div>
                                            </div>


                                            <div  id="inv_div">

                                            </div>



                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div>

                            </div>
                    </div>
                    </form>
                </div>
            </div>


        </div>
    </div>


    <!--------------------------------------------------------------------------- show Investigation Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showPatientInvestigation" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds80">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <div class="portlet-title">
                                        <div class="caption"> Investigations  </div>
                                    </div>
                                    <div class="portlet-body all">
                                        <div  id="showInvs">
                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th> <div align="center">Date </div></th>
                                                        <th colspan="3"> <div align="center">Investigations </div></th>
                                                    </tr>
                                                </thead>

                                            </table>
                                        </div>
                                        <div  id="inv_divShow">

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

