<div class="portlet box purple">
    <div class="portlet-title">
        <div class="caption">Obstetric History </div>
        <div class="actions"></div>
        <div class="tools">
            <a href="#" class="collapse" title="تصغير / تكبير"></a>
        </div>
    </div>
    <div class="portlet-body">
        <div class="row">
            <div id="ultrasoundgynaDiv">
                <div class="row">
                    <div class="portlet-body form" >
                        <form>
                            <div class="form-body">
                                <table>
                                    <thead>
                                        <tr>
                                            <th class="wds2"> G  </th>  
                                            <th class="wds2"> P </th>
                                            <th class="wds2"> C.S  </th>  
                                            <th class="wds2"> AB  </th>  
                                            <th class="wds2"> Ectopic  </th> 
                                            <th class="wds2"> V.mole  </th> 
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" G " name="g"
                                                       data-colName="g" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->g}"/>
                                            </td>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" P " name="p"
                                                       data-colName="p" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->p}"/>
                                            </td>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" C.S " name="cs"
                                                       data-colName="cs" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->cs}"/>
                                            </td>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" AB " name="ab"
                                                       data-colName="ab" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->ab}"/>
                                            </td>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" Ectopic " name="ectopicd"
                                                       data-colName="ectopicd" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->ectopicd}"/>
                                            </td>
                                            <td>
                                                <input type="text" class="amrpop form-control updateElement" 
                                                       placeholder=" V.mole " name="vmole"
                                                       data-colName="vmole" data-id="{$summaryObstetric->id}" 
                                                       data-tableName="summary_obstetric" value="{$summaryObstetric->vmole}"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>Abnormal Deliveries :  </th>
                                            <td>{$summaryObstetric->cs}</td> 
                                            <th> Date Of Last Delivery  : </th>  
                                            <td>
                                                <input type="text" placeholder="Last Delivery" name="last_delivery"  
                                                       class="form-control updateElement datepicker"  data-colName="last_delivery"  
                                                       data-id="{$summaryObstetric->id}" data-tableName="summary_obstetric" 
                                                       value="{$summaryObstetric->last_delivery}"/>
                                            </td> 
                                            <th>Abortions:  </th>
                                            <td> {$summaryObstetric->ab}  </td> 
                                        </tr>

                                </table>

                                <table>
                                    <thead>
                                        <tr>
                                            <th colspan="3">Abortion Details :  </th>
                                            <th> <a  class="btn btn-success btn-xs" id="sumAbortionAdd" > Add </a></th>
                                        </tr>
                                    </thead>
                                    <tbody id="sumAbortionContainer">
                                        {assign var=i value=1}
                                        {foreach $summaryObstetricAbortion as $obstetricAbortion }
                                        <tr>
                                            <th>Gestational age :  </th>
                                            <td>
                                                <input type="text" placeholder="Gestational age" name="obstrduration"  
                                                       class="form-control updateElement"  data-colName="obstrduration"  
                                                       data-id="{$obstetricAbortion->id}" data-tableName="summary_obstetric_abortion" 
                                                       value="{$obstetricAbortion->obstrduration}"
                                                       style="    display: inline-block; width: 85%"/> W
                                            </td> 
                                            <th>Date Of  Abortion :  </th>
                                            <td>
                                                <input type="text" placeholder="Date Of  Abortion" name="obsdate"  
                                                       class="form-control updateElement datepicker"  data-colName="obsdate"  
                                                       data-id="{$obstetricAbortion->id}" data-tableName="summary_obstetric_abortion" 
                                                       value="{$obstetricAbortion->obsdate}"/>
                                            </td> 
                                        </tr>
                                        {capture assign=i}{$i+1}{/capture}
                                        {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
