
<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; vertical-align: none !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">
        <div class="row ">
            <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> ANC Sheet
                        </div>
                        <div class="actions">
                        </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="mainAntenatalId" value="{$id}"/>
                            <input type="hidden" id="patientId" value="{$patientid}"/>
                            <!-- <input type="hidden" id="tablep"  value="infertilitysheet" /> -->
                            <div class="form-body">

                                <h2 ><a href="{$hosturl}/controllers/Ancsheet.php?ac=Index&amp;patientid={$ancsheet->patientid}" >
                                        ANC Sheet  </a></h2>
                                <hr>

                                <a style="float: right;" href="{$hosturl}/controllers/Ancsheet.php?ac=archive&amp;patientid={$patientid}" class="btn btn-default btn-sm">
                                    Archive pregnancy
                                </a>
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <th  colspan="1">LMP</th>
                                            <th  colspan="1">EED</th>
                                            <th  colspan="1">G</th>
                                            <th  colspan="1">P</th>
                                            <th  colspan="1">EPC</th>
                                            <th  colspan="1">Last Hb</th>
                                            <th  colspan="1">Placenta</th>
                                            <th  colspan="1">Notes</th>
                                        </tr>
                                        <tr>
                                            <td width="7%">{$ancsheet->sheetlmp}</td>
                                            <td width="7%">{$ancsheet->sheetedd}</td>
                                            <td  width="7%" >
                                                {$ancsheet->obstgn}  
                                            </td>
                                            <td  width="7%" >
                                                {$ancsheet->obstpn}
                                            </td>
                                            <td  width="7%" >
                                                {$ancsheet->obstepc}
                                            </td>
                                            <td width="7%">{$ancsheet->sheetlast}</td>
                                            <td  width="15%">
                                                <select  class="form-control getselectajax placenta" name="placenta" data-id="{$id}"  data-table="ancsheet"  data-celtable="placenta" id="placenta{$id}" data-selid="{$id}"  disabled="" >
                                                </select>
                                            </td>
                                            <td width="18%">{$ancsheet->sheetnte}</td>
                                        </tr>
                                    </tbody>
                                </table>





                                <table class="table table-bordered">
                                    <tbody id="investigations">
                                        <tr>
                                            <th scope="row" style="color: #fff;background:red" colspan="11">
                                                <a  style="color: #fff;" data-add="investigations"  data-id="{$id}"  data-table="ancsheetid">  Investigations</a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td width="10%"></td>
                                            <td  width="10%" class="colorred">Hb</td>
                                            <td width="10%"class="colorred">Plat</td>
                                            <td width="10%"class="colorred">FBS</td>
                                            <td width="10%"class="colorred">OGTT</td>
                                            <td width="10%"class="colorred">HBs Ag</td>
                                            <td width="10%"class="colorred"> HCV Ab</td>
                                            <td width="10%"class="colorred">CUA</td>
                                            <td width="10%"class="colorred">Ferritin</td>
                                            <td width="10%"class="colorred">Lab</td>
                                        </tr>
                                        {foreach $investigations as $single}
                                        <tr class="rowinvestigations{$single->id}"> 
                                            <th  >Date</th>
                                            <td >{$single->invesdhb}</td>
                                            <td >{$single->invesdplat}</td>
                                            <td >{$single->invesdfbs}</td>
                                            <td >{$single->invesdogtt}</td>
                                            <td >{$single->invesdhbs}</td>
                                            <td >{$single->invesdhcv}</td>
                                            <td >{$single->invesdcua}</td>
                                            <td >{$single->invesdferr}</td>
                                            <td >{$single->invesdlab}</td>

                                        </tr>
                                        <tr class="rowinvestigations{$single->id}"> 
                                            <th  >Result</th>
                                            <td >{$single->investhb}</td>
                                            <td >{$single->investplat}</td>
                                            <td >{$single->investfbs}</td>
                                            <td >{$single->invesdogtt}</td>
                                            <td >{$single->investhbs}</td>
                                            <td >{$single->investhcv}</td>
                                            <td >{$single->investcua}</td>
                                            <td >{$single->investferr}</td>
                                            <td >{$single->investlab}</td>
                                        </tr>
                                        {/foreach}
                                    </tbody>
                                </table>
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <th scope="row" style="color: #fff;background:red" colspan="10">
                                                4D
                                            </th>
                                        </tr>
                                        <tr>
                                            <td width="10%"></td>
                                            <td  class="colorred" width="40%">T1 Scan</td>
                                            <td class="colorred">T2 Scan</td>
                                        </tr>
                                        <tr>
                                            <th  >Date</th>
                                            <td >{$ancsheet->tscandate}</td>
                                            <td >{$ancsheet->ttscandate}</td>
                                        </tr>
                                        <tr>
                                            <th  >W</th>
                                            <td >{$ancsheet->tscanw}</td>
                                            <td >{$ancsheet->ttscanw}</td>
                                        </tr>
                                        <tr>
                                            <th  >Result</th>
                                            <td >{$ancsheet->tscanresult}</td>
                                            <td >{$ancsheet->ttscanresult}</td>
                                        </tr>
                                        <tr>
                                            <th  >Report</th>
                                            <td >{$ancsheet->tscanreport}</td>
                                            <td >{$ancsheet->ttscanreport}</td>
                                        </tr>
                                    </tbody>
                                </table>
                                <table class="table table-bordered">
                                    <tbody id="ancnewvisit">
                                        <tr>
                                            <th style="color: #fff;background:#19ae19" colspan="14"> 
                                                <a style="color: #fff"class="addappend" data-add="ancnewvisit" data-id="{$id}"  data-table="ancsheetid">New Visit</a>
                                            </th>
                                        </tr>
                                        {foreach $ancnewvisit as $single}
                                        <tr class="rowancnewvisit{$single->id}"> 
                                            <th width="10%" >Date</th>
                                            <th width="10%" >W</th>
                                            <th width="10%" >BW</th>
                                            <th width="10%" >BP</th>
                                            <th  width="25%" >Notes</th>
                                            <th  width="30%" >TTT (Button)</th>
                                            <th  width="5" ></th>
                                        </tr>
                                        <tr class="rowancnewvisit{$single->id}"> 
                                            <td >{$single->newvisitdate}</td>
                                            <td ><label data-id="{$single->id}" {if $single->newvisitdate < $ancsheet->sheetlmp}style="color: red;font-size: 18px;" {else} style="color: maroon; font-weight : bolder; font-size: 18px;" {/if}>{$single->newvisitw}</label>
                                            </td>
                                            <td >{$single->newvisitbw}</td>
                                            <td >{$single->newvisitbp}</td>
                                            <td >{$single->newvisitnote}</td>
                                            <td  > 
                                                <div class="actions">
                                                    <div class="btn-group">
                                                        <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                                            TTT <i class="fa fa-angle-down"></i>
                                                        </a>
                                                        <ul class="dropdown-menu pull-right">

                                                            <li>
                                                                <a href="javascript:;" id="showDrugs" data-controller="ancsheet" data-archive="1">
                                                                    Show </a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>

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


                                        <tr class="rowancnewvisit{$single->id}"> 
                                            <th width="10%" >N</th>
                                            <th width="10%" >Biom - FHR</th>
                                            <th width="20%" >EFW</th>
                                            <th width="20%" >Placenta</th>
                                            <th  width="20%" >AF</th>
                                            <th  width="20%" >Notes</th>
                                            <th  width="5" ></th>
                                        </tr>
                                        <tr class="rowancnewvisit{$single->id}"> 
                                            <td  >
                                                <select  class="form-control getselectajax usn" name="usn" data-id="{$single->id}"  data-table="ancnewvisit"  data-celtable="usn" id="usn{$single->id}" data-selid="{$single->id}" disabled="">
                                                </select>
                                            </td>
                                            <td >{$single->usbiom}</td>
                                            <td >{$single->usefw}</td>
                                            <td  width="10%">
                                                <select  class="form-control getselectajax usplace" name="usplace" data-id="{$single->id}"  data-table="ancnewvisit"  data-celtable="usplace" id="usplace{$single->id}" data-selid="{$single->id}" disabled="">
                                                </select>
                                            </td>
                                            <td  width="10%">
                                                <select  class="form-control getselectajax usaf" name="usaf" data-id="{$single->id}"  data-table="ancnewvisit"  data-celtable="usaf" id="usaf{$single->id}" data-selid="{$single->id}" disabled="" >
                                                </select>
                                            </td>
                                            <td >  {$single->newvisitnote2}</td>
                                            <td></td>

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



                                <div class="actions">
                                    <a href="{$hosturl}/controllers/Ancsheet.php?ac=archive&amp;patientid={$patientid}" class="btn btn-default btn-sm">
                                        Archive pregnancy
                                    </a>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-1"></div>
                                    <div class="col-md-8">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>






<div class="all">   

    <!---------------------------------------------------------------------------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>



    <!--------------------------------------------------------------------------- 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 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"> Investigations  </div>
                                    </div>
                                    <div class="portlet-body">
                                        <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>



