<div class="row" id="tab-content">
    <div class="col-md-12">
        <div class="tabbable tabbable-custom">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#" aria-expanded="false">
                    <i class="fa fa-edit"></i> <?= $judul ?> </a>
                </li> 
            </ul>
            <div class="tab-content">
                <div class="tab-pane active">

                  <div class="row" id="info-content" style="display:block">
                      <div class="col-md-12">
                          <div class="portlet box green-haze" style="position:relative">
                              <div class="portlet-title">
                                  <div class="caption">
                                      <i class="fa fa-user"></i> Informasi Pasien
                                  </div>
                              </div>
                              <div class="portlet-body form">
                                  <form class="form-horizontal form-bordered form-row-stripped" role="form">
                                      <div class="form-body">
                                          <div class="form-group">
                                              <label class="form-control-static col-md-2">Nomor Rekam Medis </label>
                                              <p class="form-control-static col-md-10">
                                                  : &nbsp; BBMC-000008 
                                              </p>
                                              <label class="form-control-static col-md-2">Nama Pasien </label>
                                              <p class="form-control-static col-md-10">
                                                  : &nbsp; I KETUT KARDIKA 
                                              </p>
                                              <label class="form-control-static col-md-2">Type Pasien</label>
                                              <p class="form-control-static col-md-10">
                                                  : &nbsp; UMUM
                                              </p>
                                              <label class="form-control-static col-md-2">Nomor SPJ</label>
                                              <p class="form-control-static col-md-10">
                                                  : &nbsp; SPJ-004312 
                                              </p>
                                          </div>                                    
                                      </div>
                                  </form>
                              </div>
                          </div>
                      </div>
                  </div>

                  <div class="row" id="portlet-content">
                    <div class="col-md-12">
                      <div class="portlet light" style="position:relative">
                        
                        <div class="portlet-body form" id="page-content" style="display:none">
                          <form action="<?= site_url('front_office/'.$controller_dir.$controller.'/tambah_data_proses_standard') ?>" method="post" id="<?=$controller?>" enctype="multipart/form-data" class="horizontal-form">
                            <div class="form-body">
                              <div class="alert alert-danger display-hide" style="display:none;" id="error">
                                <button class="close" data-close="alert"></button>
                                <span id="error-text"></span>
                              </div>                                 

                              <h4 class="form-section" style="margin:0px 0px 20px 0px !important; padding-bottom:0px !important">
                                <i class="fa fa-align-justify"></i> <strong> Data Rekam Medis <hr style="margin:10px 0px !important" > </strong>
                              </h4>
                              <div class="row">
                                <div class="col-md-6">
                                  <div class="form-group" id="form_no_registrasi">
                                    <label for="no_registrasi" class="control-label">Nomor Registrasi <span class="required">* </span></label>
                                    <input type="text" id="no_registrasi" name="no_registrasi" class="form-control" placeholder="Nomor Registrasi" value="150420-231"
                                    <span id="error_no_registrasi" class="help-block"></span>
                                  </div>
                                </div>
                              
                                <div class="col-md-6">
                                  <div class="form-group" id="form_tgl_kunjungan">
                                    <label for="tgl_kunjungan" class="control-label">Tanggal Kunjungan <span class="required">* </span></label>
                                    <div class="input-group date" id="datepicker_tglkunjungan">
                                        <span class="input-group-btn">
                                            <button class="btn default" type="button"><i class="fa fa-calendar"></i></button>
                                        </span>
                                        <input type="text" id="tgl_kunjungan" name="tgl_kunjungan" class="form-control" placeholder="Tanggal Kunjungan" value="2020/04/15">
                                    </div>                                                                                       
                                    <span id="error_tgl_kunjungan" class="help-block"></span>
                                  </div>
                                </div>                    
                              </div>

                              <div class="row">
                                <div class="col-md-6">
                                  <div class="form-group" id="form_keluhan">
                                    <label for="keluhan" class="control-label">Keluhan </label>
                                    <input type="text" id="keluhan" name="keluhan" class="form-control" placeholder="Keluhan Pasien" value="Panas Sejak Kemarin">
                                    <span id="error_keluhan" class="help-block"></span>
                                  </div>
                                </div>
                              
                                <div class="col-md-6">
                                  <div class="form-group" id="form_ruangan">
                                    <label for="ruangan" class="control-label">Ruangan <span class="required">* </span></label>
                                    <select id="ruangan" name="ruangan[]" style="width:100%">
                                      <option value=""></option>
                                      <option value="melati">Melati </option>
                                      <option value="mawar" selected>Mawar </option>
                                      <option value="flamboyan">Flamboyan </option>
                                    </select> 
                                    <span id="error_ruangan" class="help-block"></span>
                                  </div>
                                </div>                    
                              </div>
                              
                              <div class="row">
                                <div class="col-md-6">
                                 <div class="form-group" id="form_poliklinik">
                                    <label for="poliklinik" class="control-label">Poliklinik <span class="required">* </span></label>
                                    <select id="poliklinik" name="poliklinik[]" style="width:100%">
                                      <option value=""></option>
                                      <option value="ugd" selected>UGD </option>
                                      <option value="poliklinik_gigi">Poliklinik Gigi </option>
                                      <option value="poliklinik_paru">Poliklinik Paru </option>
                                      <option value="poliklinik_jantung">Poliklinik Jantung </option>
                                      <option value="poliklinik_penyakit_dalam">Poliklinik Penyakit Dalam </option>
                                      <option value="poliklinik_mata">Poliklinik Mata </option>
                                    </select> 
                                    <span id="error_poliklinik" class="help-block"></span>
                                  </div>
                                </div>
                              
                                <div class="col-md-6">
                                  <div class="form-group" id="form_gol_sebab_sakit">
                                    <label for="gol_sebab_sakit" class="control-label">Golongan Sebab Sakit <span class="required">* </span></label>
                                    <select id="gol_sebab_sakit" name="gol_sebab_sakit[]" style="width:100%">
                                      <option value=""></option>
                                      <option value="sindrom_rett">Sindrom Rett </option>
                                      <option value="sippi" selected>SIPPI </option>
                                      <option value="mental_retardasi ">Mental Retardasi </option>
                                      <option value="carsinoma">Carsinoma </option>
                                      <option value="undersensus_testis">Undersensus Testis </option>
                                      <option value="emergency_treatment">Emergency Treatment </option>
                                    </select> 
                                    <span id="error_gol_sebab_sakit" class="help-block"></span>
                                  </div>
                                </div>                    
                              </div>                           

                            </div>
                            <div class="form-actions right">
                              <a type="button" class="btn default" href="<?= site_url('front_office/'.$controller_dir.$controller) ?>">Kembali</a>
                              <button type="submit" class="btn blue"><i class="fa fa-check"></i> Tambah</button>
                            </div>
                          </form>
                        </div>
                        <?php $this->load->view('front_office/include/loading'); ?>
                      </div>
                    </div>
                  </div>

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

<script type="text/javascript">
  $(document).ready(function() {
     /*-------------Datepicker-------------*/
    $('#datepicker_tglkunjungan').datepicker({
      format: "yyyy-mm-dd",
      clearBtn: true,
      language: 'id',
      autoclose: true,
      todayHighlight: true
    });

    $("#ruangan").select2({
      placeholder: "Pilih Ruangan",
      closeOnSelect: false,
      language: "id"
    });
    
    $("#poliklinik").select2({
      placeholder: "Pilih Poliklinik",
      closeOnSelect: false,
      language: "id"
    });    

    $("#gol_sebab_sakit").select2({
      placeholder: "Pilih Gol Sebab Sakit",
      closeOnSelect: false,
      language: "id"
    });

    $("#loading-content,#loading").fadeOut("fast", function() {
      $("#page-content").fadeIn("fast");
    });

  });
</script>
<?php $this->load->view('front_office/script/form_data'); ?>