Exemplo n.º 1
0
 private void HienThiThongTinBenhNhan(string maBenhNhan, string maDonVi, string maKhachHang, string maTiepNhan, string rowID, string maTiepNhan2, bool isBNNguyCo)
 {
     try
     {
         this.txtMaBenhNhan.Text          = maBenhNhan;
         this.txtMaKhachHang.Text         = maKhachHang;
         this.txtRowIDBenhNhanNguyCo.Text = rowID;
         if (isBNNguyCo)
         {
             this.btnMoi.Enabled       = true;
             this.btnNguyCoGia.Enabled = true;
             this.btnNguyCoGia.Text    = "Nguy cơ giả";
         }
         else
         {
             this.btnNguyCoGia.Enabled = true;
             this.btnMoi.Enabled       = false;
             this.btnNguyCoGia.Text    = "Nguy cơ cao";
         }
         PSPatient bn = BioNet_Bus.GetThongTinBenhNhan(maBenhNhan);
         this.lstDotChanDoan.Clear();
         try
         {
             this.lstDotChanDoan = BioNet_Bus.GetDanhSachDotChanDoanCuaBenhNhan(long.Parse(rowID));
             this.LoadListTreeView();
         }
         catch (Exception ex)
         {
             MessageBox.Show("Lỗi khi danh sách đợt chẩn đoán! \r\n Lỗi chi tiết : " + ex.ToString(), "BioNet - Chương trình sàng lọc sơ sinh", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         this.lstChiTietKQ.Clear();
         this.lstChiTietKQCu.Clear();
         if (!string.IsNullOrEmpty(maTiepNhan2))
         {
             this.lstChiTietKQ   = BioNet_Bus.GetDanhSachTraKetQuaChiTiet(maTiepNhan2);
             this.lstChiTietKQCu = BioNet_Bus.GetDanhSachTraKetQuaChiTiet(maTiepNhan);
             this.xtraTabKQChiTietCu.PageVisible = true;
             this.LoadGCKQChiTiet();
             this.LoadGCKQChiTietCu();
         }
         else
         {
             this.lstChiTietKQ = BioNet_Bus.GetDanhSachTraKetQuaChiTiet(maTiepNhan);
             this.xtraTabKQChiTietCu.PageVisible = false;  this.LoadGCKQChiTiet();
         }
         if (bn != null)
         {
             this.txtDiaChi.Text            = bn.DiaChi;
             this.txtGioiTinh.SelectedIndex = bn.GioiTinh ?? 2;
             this.txtMaDonVi.EditValue      = maDonVi;
             this.txtNgaySinh.EditValue     = bn.NgayGioSinh;
             this.txtSDT.Text   = string.IsNullOrEmpty(bn.MotherPhoneNumber.ToString()) ? bn.FatherPhoneNumber.ToString() : bn.MotherPhoneNumber.ToString();
             this.txtTenBN.Text = string.IsNullOrEmpty(bn.TenBenhNhan.ToString()) ? "CB_" + bn.MotherName: bn.TenBenhNhan.ToString();
             this.txtTenMe.Text = bn.MotherName;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Lỗi khi lấy thông tin bệnh nhân \r\n Lỗi chi tiết : " + ex.ToString(), "BioNet - Chương trình sàng lọc sơ sinh", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }