<script type="text/javascript">

    $(document).ready(function() {
        $("#date, #date2,#date3,#date4").datepicker();
        $("#date,#date2,#date3,#date4 ").datepicker("option", "dateFormat", "yy/mm/dd");

        var d = new Date();
        var twoDigitMonth = (d.getMonth() + 1) + "";
        if (twoDigitMonth.length == 1)
            twoDigitMonth = "0" + twoDigitMonth;
        var twoDigitDate = d.getDate() + "";
        if (twoDigitDate.length == 1)
            twoDigitDate = "0" + twoDigitDate;
        var todaysM = d.getFullYear() + "/" + twoDigitMonth + "/" + twoDigitDate;
        if ($("#date,#date2,#date3,#date4").val() == "") {
            $("#date,#date2,#date3,#date4").val(todaysM);
        }
    });

</script>
<!-- Form Start -->
<div class="block">
    <div class="title lightTextShadow">تقرير الإستمارات الطبية</div>
    <div class="content">
        <?php echo form_open('patient/admin_patient/search_adv', array('id' => 'patient_new')) ?>
        <fieldset class="form boxStyle">
            <?php echo $this->template->flash_msg(); ?>
            <div class="inlineBlock">

                <label for="pi_num" class="label">رقم الحالة :</label>
                <input id="pi_name" class="textBox med2 rnd5" name="pi_num" value="<?= set_value('pi_num') ?>"/><br />
                <?php echo form_error('pi_num'); ?>

                <label for="pi_passport" class="label">رقم جواز السفر :</label>
                <input id="pi_passport" class="textBox med2 rnd5" name="pi_passport" value="<?= set_value('pi_passport') ?>"/><br />

                <label for="date2" class="label">من تاريخ :</label>
                <input class="inputDate textBox rnd5" id="date" name="pi_date_reg"  value="<?= set_value('pi_date_reg') ?>" /><br />

                <label for="date" class="label">الى تاريخ :</label>
                <input class="inputDate2 textBox rnd5" id="date2" name="pi_date_reg2"  value="<?= set_value('pi_date_reg2') ?>" /><br />
            </div>
            <div class="inlineBlock">
                <label for="pi_name" class="label" >اسم المريض :</label>
                <input id="pi_name" class="textBox med2 rnd5" name="pi_name" value="<?= set_value('pi_name') ?>"/><br />

                <label class="label">الجنس :</label>
                <select size="1" name="pi_gender" class="select med3 rnd5">
                    <option value=""> -- اختر -- </option>
                    <option value="1">ذكر</option>
                    <option value="0">انثي</option>
                </select><br />

                <label class="label">الاهمية :</label>
                <select size="1" name="pi_importance" class="select med3 rnd5">
                    <option value=""> -- اختر -- </option>
                    <option value="0">طارئ</option>
                    <option value="1">مستعجل</option>
                    <option value="2">عادي</option>
                    <option value="3">أخري</option>
                </select><br />

                <label class="label">الفرع :</label>
                    <?php echo form_dropdown('pi_branch_id', $branch_category, '', 'class="select med3 rnd5"'); ?> <br />
                    <?php echo form_error('pi_branch_id'); ?>
            </div>
            <div class="center">
                <input id="submit" type="reset" value="تفريغ الحقول" class="button sub inlineBlock rnd3 lightTextShadow" />
                <input id="submit2" type="submit" value="طباعة" class="button sml inlineBlock rnd5 drkTextShadow" />
            </div>
        </fieldset>
        </form>
    </div>
</div><!-- Form End -->