<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> Patient History Data
                        </div>
                    </div>
                    <div class="portlet-body" >
                        <!-- END PAGE HEADER-->
                        <!-- BEGIN PAGE CONTENT-->
                        <div class="row" >

                            <div class="portlet-title tbox">
                                <div class="caption font-green-haze col-md-6">
                                    <span class="caption-subject bold uppercase"> Patient History Data </span>
                                </div>
                                <div class="actions col-md-6">

                                </div>
                            </div>

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

                            <div class="row">
                                <div class="col-md-12">


                                    <table class="table table-striped table-bordered table-hover" >

                                        <tr class="odd gradeX">

                                            <td>
                                                Menstrual H
                                            </td>
                                            {if $phmenstrualcount > 0}
                                            <td>
                                                {$myphmenstrual->menarche}
                                            </td>

                                            <td>
                                                {$myphmenstrual->duration}
                                            </td>

                                            <td>
                                                {$myphmenstrual->length}
                                            </td>


                                            <td>
                                                Regularity : {$phregualrity->name}
                                            </td>


                                            <td>
                                                Amount : {$phamount->name}
                                            </td>

                                            <td>
                                                Dysmenorrhoea :{$phdysmenorrhoea->name}
                                            </td>


                                            <td>
                                                LMP : {$myphmenstrual->phlMP}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" data-id="" id="mensturaldata_btn" ><i class="icon-book-open"></i> Detail</button>

                                            </td>

                                            {else}

                                            <td>
                                                no data
                                            </td>

                                            {/if}



                                        </tr>


                                        <!-- ========================================================Contraception================================================================-->

                                        <tr class="odd gradeX">

                                            <td>
                                                Contraception H
                                            </td>
                                            {if $myallcontractcount > 0}

                                            <td colspan="2">
                                                Type :  {$phcontracttype->name}
                                            </td>

                                            <td>
                                                Duration :  {$myallcontract->contduration} Y
                                            </td>

                                            <td>
                                                Stopped :  {$myallcontract->contstopped} Y
                                            </td>

                                            <td colspan="3">
                                                Note : {$myallcontract->contranote}
                                            </td>

                                            <td>
                                                <button type="button" class="btn btn-xs red fright" data-id="" id="contractdata_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>

                                            {else}

                                            <td>
                                                no data
                                            </td>

                                            {/if}



                                        </tr>



                                        <!-- ========================================================Obstetric H================================================================-->

                                        <tr class="odd gradeX">

                                            <td>
                                                Obstetric H
                                            </td>

                                            {if $myallobsteric > 0}
                                            <td colspan="2">
                                                G :  {$myallobsteric}
                                            </td>
                                            {foreach $allphobstericterminate as $myterminate}
                                            <td>
                                                {$myterminate->name} :  {$myterminate->obcounter}
                                            </td>
                                            {/foreach}

                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="obstetricdata_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>

                                            {else}

                                            <td>
                                                no data
                                            </td>

                                            {/if}



                                        </tr>




                                        <!-- ========================================================Past Medical H================================================================-->
                                        {if $allpastmedicalcount > 0}
                                        <tr class="odd gradeX">

                                            <td>
                                                Past Medical H
                                            </td>




                                            <td colspan="7">
                                                Disease : {foreach $allpastmedical as $myallpastmedical} {$myallpastmedical.name} ,{/foreach}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="pastmedicaldata_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>

                                        </tr>


                                        {/if}








                                        <!-- ========================================================Past surgical H================================================================-->

                                        {if $allpastsurgicalcount > 0}
                                        <tr class="odd gradeX">

                                            <td>
                                                Past Surgical H
                                            </td>
                                            <td colspan="7">


                                                Operation : {foreach $allpastsurgical as $myallpastsurgical} {$myallpastsurgical.name} ,{/foreach}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="phpastsurgical_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>



                                        </tr>

                                        {/if}

                                        <!-- ========================================================Past Gynecological H================================================================-->

                                        {if $allphpastgynecologicalcount > 0}
                                        <tr class="odd gradeX">

                                            <td>
                                                Past Gynecological
                                            </td>
                                            <td colspan="7">


                                                Operation : {foreach $allphpastgynecological as $myallphpastgynecological} {$myallphpastgynecological.name} ,{/foreach}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="phpastgynecological_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>



                                        </tr>

                                        {/if}







                                        <!-- ========================================================Past art H================================================================-->

                                        {if $allphpastartcount > 0}
                                        <tr class="odd gradeX">

                                            <td>
                                                Past ART
                                            </td>
                                            <td colspan="7">


                                                Type : {foreach $allphpastart as $myallphpastart} {$myallphpastart.name} ,{/foreach}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="phpastart_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>



                                        </tr>
                                        {/if}

                                        <!-- ========================================================Family H================================================================-->

                                        <tr class="odd gradeX">

                                            <td>
                                                Family H
                                            </td>

                                            {if $allphfamilycount > 0}


                                            <td colspan="7">


                                                Disease : {foreach $allphfamily as $myallphfamily} {$myallphfamily.name} ,{/foreach}
                                            </td>


                                            <td>
                                                <button type="button" class="btn btn-xs red fright" id="phfamily_btn" ><i class="icon-book-open"></i> Detail</button>
                                            </td>

                                            {else}

                                            <td>
                                                no data
                                            </td>

                                            {/if}


                                        </tr>


                                    </table>

                                </div>
                            </div>
                            <!-- END PAGE CONTENT-->

                            <!-- END CONTENT -->






                            <!--==============================================================model for detail ============================================================================ -->
                            <div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="phdetail_model">
                                <div class="modal-dialog wds49">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                                            <h4 class="modal-title"> SHOW DATA fff</h4>
                                        </div>
                                        <div class="modal-body">
                                            <div class="portlet-body form">

                                                <div id="alldetails"></div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn default" data-dismiss="modal">Close</button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- /.modal-content -->
                                    </div>
                                </div>
                            </div>



