
<!-- end app-header -->
<!-- begin app-container -->
<div class="app-container">
    <!-- begin app-nabar -->
    <aside class="app-navbar">
        <? include "application/views/template/menu/sidemain.php"; ?>
    </aside>
    <!-- end app-navbar -->
    <!-- begin app-main -->
    <div class="app-main" id="main">
        <!-- begin container-fluid -->
        <div class="container-fluid">

            <? include "application/views/template/topstrip.php"; ?>
            <!-- begin row -->

            <div class="row">
                <!-- div class="col-lg-6 col-xxl-4 m-b-30">
                                  
                </div -->

                <div class="col-xxl-4 m-b-30">
                    <div class="card card-statistics h-40 mb-0">
                        <div class="card-header d-flex justify-content-between">
                            <div class="card-heading">
                                <h4 class="card-title">Find Patient</h4>
                            </div>
                            <div class="dropdown">
                                <!-- a class="btn btn-round btn-inverse-primary btn-xs" href="#">View all </a -->
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="card-body">
                                <form name="linkform">
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="inputLinkID">Enter Search</label>
                                            <input type="text" class="form-control" id="patient_link_id" name="patient_link_id" value="<?= isset($patient_link_id) ? $patient_link_id : '' ?>" placeholder="find....">
                                        </div>                                        
                                    </div>  
                                    <div class="form-row">
                                        <div class="form-group col-md-9">
                                            <div id="link_result">[]</div>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <button type="submit" id="link_submit" class="btn btn-primary btn-block" onclick="return connectLinkID()">Search</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-8 m-b-30">
                    <? include 'application/views/provider/components/large_patient_listing.php'; ?>
                </div>

            </div>






        </div>
        <!-- end container-fluid -->
    </div>
    <!-- end app-main -->
</div>
<!-- end app-container -->
<!-- begin footer -->

<script type="text/javascript">
 <!--
 
    function connectLinkID() {
        var patient_link_id = document.linkform.patient_link_id.value;
       // alert(patient_link_id);
        
        if (patient_link_id === '' ) {
            alert('You must enter valid search paramters to continue!');
            return false;
        }

        // alert(job_description);
        $('#link_result').html('Processing...');
        $('#link_submit').prop('disabled', true);
        $.ajax({
            url: "/patient/linkpatient?patient_link_id=" + patient_link_id
        }).done(function (data) {
            $('#link_result').html(data);
            document.linkform.patient_link_id.value = '';
            $('#link_submit').prop('disabled', false);
        });
        return false;
    }
 
    // -->    
</script>
