
<div class="page-content-wrapper">
    <div class="page-content all">
        <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> Rays Requests
                        </div>
                        <div class="actions">
                            <a class="btn blue btn-xs" href="{$hosturl}/controllers/{$controllname}.php?ac=archive" style=" float: left;"  >
                                <i class="fa fa-pencil"></i> archive
                            </a>
                            <a class="btn btn-success btn-xs" href="{$hosturl}/controllers/visits.php" style=" float: left;"  >
                                <i class="fa fa-pencil"></i> new Visit
                            </a>

                            <!--a class="btn btn-success btn-xs" href="{$hosturl}/controllers/visits.php">New Visit</a-->
                            <a class="btn red-soft btn-xs" href="{$hosturl}/controllers/patients.php" style=" float: left;"  >
                                <i class="fa fa-pencil"></i> New Patient
                            </a>
                        </div>






                    </div>
                    <div class="portlet-body" >
                        <div class="table-toolbar">

                        </div>

                        <div class="form-body">
                            <div class="col-md-6">
                                <div class="form-group form-md-line-input has-success">
                                    <input type="text" class="form-control datepicker searchRecords"  style=" border: 1px solid #000000;"   readonly="readonly"  id="searchValue1" data-type="rays" data-type1="ray"  data-status="0"  value="{$today}"/>
                                    <label for="searchValue1">Date From</label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group form-md-line-input has-success">
                                    <input type="text" class="form-control datepicker searchRecords"  style=" border: 1px solid #000000;"    readonly="readonly" id="searchValue2" data-type="rays" data-type1="ray"  data-status="0"   value="{$today}"/>
                                    <label for="searchValue2">Date To</label>
                                </div>
                            </div>
                        </div>

                        <div id="resultTableDiv">
                            <table class="table table-striped table-hover table-bordered" id="rayRequesrsTable">
                                <thead>
                                    <tr>
                                        <th>
                                            Visit Date
                                        </th>
                                        <th>
                                            Patient name
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>

                                    {foreach $requests as $single}
                                    <tr>

                                        <td>
                                            {$single.visitDate}
                                        </td>
                                        <td>
                                            <a target="_blank"  href="{$hosturl}/controllers/{$controllname}.php?ac=showdetails&id={$single.visitid}"  href="#" >
                                                {if  $single.for_husband == 1 }
                                                {$single.husbandName}
                                                {else if  $single.for_husband == 2}

                                                {if $single.child_name != ''  && $single.child_name != null } 
                                                {$single.child_name}  /  {$single.wifeName}
                                                {else}
                                                {if $single.child_gender eq 1} طفل {else} طفلة  {/if}     /  {$single.wifeName}
                                                {/if} 

                                                {else}
                                                {$single.wifeName}
                                                {/if}
                                            </a>
                                        </td>
                                    </tr> 

                                    {/foreach}
                                </tbody>
                            </table>
                        </div>


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

</div>

<input type="hidden" id="controllName" value="addrays"/>





<!----#########################################################################  model ##############################################################################################################--->
<div class="all">
    <!--------------------------------------------------------------------------- simple form Ultrasound Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="raysModel" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds65">
            <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">
                                            <i class="fa fa-cogs"></i> Rays
                                        </div>
                                        <div class="actions">
                                            <a href="javascript:;" class="btn btn-default btn-sm" id="ray_add">
                                                <i class="fa fa-plus"></i> Add </a>

                                        </div>
                                    </div>
                                    <div class="portlet-body">

                                        <table class="table table-striped table-hover table-bordered" id="rays" >
                                            <thead>
                                                <tr>
                                                    <th>
                                                        Rays
                                                    </th>
                                                    <th>
                                                        Range
                                                    </th>
                                                    <th>
                                                        Measuring Unit
                                                    </th>
                                                    <th>
                                                        Favorite
                                                    </th>
                                                    <th>
                                                        Edit
                                                    </th>
                                                    <th>
                                                        Delete
                                                    </th>
                                                </tr>

                                            </thead>
                                            <tbody id="showCatRay">

                                            </tbody>
                                        </table>
                                        <input type="hidden" id="catId" value=""/>
                                    </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>




    <!-------------##############################-------------------- End of Models -----------------------#########################################-------------->
</div>