public void assignTests(DTO.HoSoBenhAnDTO hoso, List <DTO.XetNghiemDTO> danhSachXN, Action <string> completion) { this.updateHoSo(hoso, rslt => { if (rslt.Equals(COM.Constant.RES_SUC)) { var listKQXN = new List <DTO.KetQuaXetNghiemDTO>(); danhSachXN.ForEach(xn => { listKQXN.Add(new DTO.KetQuaXetNghiemDTO() { MaHoSo = hoso.MaHoSo, MaXetNghiem = xn.MaXetNghiem, ThanhToan = false, MaBacSi = Common.User.SharedInstance.UserId }); }); var result = this.xetNghiemBus.AssignXetNghiem(listKQXN); completion(result); } else { completion(COM.Constant.RES_FAI); } }); }
public void checkInput(DTO.HoSoBenhAnDTO hoso, Action <string, List <string> > completion) { var listMessageError = new List <string>(); var result = this.clientBus.InputCheck(hoso, ref listMessageError); completion(result, listMessageError); }
private void accessCell(DTO.HoSoBenhAnDTO hoso) { var ketquaxetnghiem = this.bus.getKetQuaXetNghiem(hoso.MaHoSo); if (ketquaxetnghiem == null) { MessageBox.Show("Không thể lấy kết quả xét nghiệm!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var formContainer = new Form() { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, StartPosition = FormStartPosition.CenterParent }; var detailControl = new SubForms.AnalysisDetail(hoso, ketquaxetnghiem) { Left = Top = 0, Anchor = AnchorStyles.Left | AnchorStyles.Top }; detailControl.WillConfirm += (childForm, ketQuaXetNghiem) => { var toDay = DateTime.Now; ketQuaXetNghiem.NgayXetNghiem = toDay.ToString("yyyyMMdd"); this.bus.xetNghiemProcessing(ketQuaXetNghiem, result => { if (result.Equals(COM.Constant.RES_SUC)) { MessageBox.Show("Ghi kết quả xét nghiệm thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); //Show final result screen. var finalControl = new SubForms.AnalysisConfirm(hoso, ketQuaXetNghiem.KetQua, false) { Left = Top = 0, Anchor = AnchorStyles.Left | AnchorStyles.Top }; finalControl.WillConfirm += (obj, er) => { formContainer.Close(); this.fetchData(null); }; formContainer.Controls.Clear(); formContainer.Controls.Add(finalControl); } else { MessageBox.Show("Ghi kết quả xét nghiệm thất bại", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }); }; formContainer.Controls.Add(detailControl); formContainer.ShowDialog(); }
public AnalysisConfirm(DTO.HoSoBenhAnDTO hoso, string ketQuaXetNghiem, bool isConfirm = true) { InitializeComponent(); this.hoso = hoso; this.ketQuaXetNghiem = ketQuaXetNghiem; this.btnConfirm.Text = isConfirm ? "Xác nhận" : "OK"; this.btnBack.Visible = isConfirm; }
public void getInformationToShowLatestRecord(DTO.HoSoBenhAnDTO hoso, Action <string, string, string, List <Model.ThuocView>, string> completion) { var ngayTiepNhan = Common.ClinicBus.convertDateToView(hoso.NgayKham); var listNhanVien = new List <DTO.NhanVienDTO>(); this.clientBus.GetListNhanVien(Common.User.SharedInstance.RoomId, out listNhanVien); var bacSi = listNhanVien.Find(nv => nv.MaNV.Equals(hoso.MaBacSi)); if (bacSi == null) { completion("", "", "", null, COM.Constant.RES_FAI); return; } var chuanDoan = hoso.ChuanDoan; var donThuoc = new DTO.DonThuocDTO(); var chiTietDonThuoc = new List <DTO.ChiTietDonThuocDTO>(); var rs = this.clientBus.GetDonThuoc(hoso.MaHoSo, out donThuoc, out chiTietDonThuoc); if (rs.Equals(COM.Constant.RES_FAI)) { completion("", "", "", null, COM.Constant.RES_FAI); return; } var listThuoc = new List <Model.ThuocView>(); chiTietDonThuoc.ForEach(ctThuoc => { var thuoc = this.getThuoc(ctThuoc.MaThuoc); if (thuoc != null) { listThuoc.Add(new Model.ThuocView() { MaThuoc = ctThuoc.MaThuoc, TenThuoc = thuoc.TenThuoc, GhiChu = donThuoc.GhiChu, SoLuong = ctThuoc.SoLuong }); } }); completion(ngayTiepNhan, bacSi.HoTenNV, chuanDoan, listThuoc, COM.Constant.RES_SUC); }
private void btnCreate_Click(object sender, EventArgs e) { var loaiHoSo = (DTO.LoaiHoSoDTO) this.cbLoaiHoSo.SelectedItem; var nguoiTiepNhan = (DTO.NhanVienDTO) this.cbNguoiTiepNhan.SelectedItem; var phongKham = (DTO.PhongKhamDTO) this.cbPhong.SelectedItem; if (this.patient == null) { return; } var hoso = new DTO.HoSoBenhAnDTO() { MaBenhNhan = this.patient.MaBenhNhan, MaHoSoTruoc = this.cbMaHoSoTruoc.Text, MaLoaiHoSo = loaiHoSo != null ? loaiHoSo.MaLoaiHoSo : "", MaNguoiTN = nguoiTiepNhan != null ? nguoiTiepNhan.MaNV : "", NgayTiepNhan = DateTime.Now.ToString("yyyyMMdd"), YeuCauKham = this.txtYeuCauKham.getText, MaPhongKham = phongKham != null ? phongKham.MaPhong : "" }; var thanhToan = new DTO.ThanhToanDTO() { ChiPhiKham = ClinicManagement.Common.SourceLibrary.PhiKhamTiepNhan }; this.bus.TiepNhanInputCheck(hoso, thanhToan, (result, listMessageError) => { if (result.Equals(COM.Constant.RES_FAI)) { var msg = ""; listMessageError.ForEach(m => msg += String.Format("{0}\n", m)); MessageBox.Show(msg, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.btnConfirm.BringToFront(); this.btnBack.Visible = true; this.cbLoaiHoSo.Enabled = this.cbMaHoSoTruoc.Enabled = this.cbNguoiTiepNhan.Enabled = this.cbPhong.Enabled = this.txtYeuCauKham.Enabled = false; }); }
public void TiepNhanInputCheck(DTO.HoSoBenhAnDTO hoso, DTO.ThanhToanDTO thanhToan, Action <string, List <string> > completion) { var listMessageError = new List <string>(); var tiepNhanEntity = new BUS.Inc.TiepNhanInputCheck.TiepNhanEntity() { MaHoSoTruoc = hoso.MaHoSoTruoc, MaLoaiHoSo = hoso.MaLoaiHoSo, NgayTiepNhan = hoso.NgayTiepNhan, MaNguoiTN = hoso.MaNguoiTN, MaPhongKham = hoso.MaPhongKham, ChiPhiKham = thanhToan.ChiPhiKham, YeuCauKham = hoso.YeuCauKham }; var result = this.clientBus.TiepNhanInputCheck(tiepNhanEntity, ref listMessageError); completion(result, listMessageError); }
private void accessCell(DTO.HoSoBenhAnDTO hoso) { var formContainer = new Form() { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, StartPosition = FormStartPosition.CenterParent }; var detailControl = new Subforms.PaymentDetail(hoso) { Left = Top = 0, Anchor = AnchorStyles.Left | AnchorStyles.Top }; formContainer.Controls.Add(detailControl); formContainer.ShowDialog(); }
public ExaminationConfirm(DTO.HoSoBenhAnDTO hoso, string tenPhong, DTO.BenhNhanDTO benhNhan, string chiphi = null, List <DTO.ChiTietDonThuocDTO> danhSachThuoc = null, List <DTO.XetNghiemDTO> danhSachXetNghiem = null, bool isConfirm = true) { InitializeComponent(); this.hoso = hoso; this.tenPhong = tenPhong; this.benhNhan = benhNhan; this.danhSachThuoc = danhSachThuoc; this.danhSachXetNghiem = danhSachXetNghiem; this.btnXacNhan.Text = isConfirm ? "Xác nhận" : "OK"; this.btnBack.Visible = isConfirm; if (chiphi != null) { this.txtChiPhi.Text = chiphi; } else { this.txtChiPhi.Visible = false; } this.ControlRemoved += ControlRemovedEvent; Application.AddMessageFilter(this); }
public void keDonThuoc(DTO.HoSoBenhAnDTO hoso, List <DTO.ChiTietDonThuocDTO> danhSachThuoc, Action <string> completion) { var donThuoc = new DTO.DonThuocDTO() { MaHoSo = hoso.MaHoSo, NgayLap = DateTime.Now.ToString("yyyyMMdd") }; this.saveDonThuoc(donThuoc, danhSachThuoc, result => { if (result.Equals(COM.Constant.RES_SUC)) { hoso.CoKeDon = true; this.finishKham(hoso, (isFinish) => { completion(isFinish); }); } else { completion(COM.Constant.RES_FAI); } }); }
public PaymentConfirm(DTO.HoSoBenhAnDTO hoso, List <DTO.KetQuaXetNghiemDTO> danhSachCanThanhToan) { InitializeComponent(); this.hoso = hoso; this.danhSachCanThanhToan = danhSachCanThanhToan; }
public MedicalExaminationAfterTests(DTO.HoSoBenhAnDTO hoso) { InitializeComponent(); this.hoSoBenhAn = hoso; }
public AnalysisDetail(DTO.HoSoBenhAnDTO hoso, DTO.KetQuaXetNghiemDTO ketQuaXetNghiem) { InitializeComponent(); this.hoso = hoso; this.ketQuaXetNghiem = ketQuaXetNghiem; }
public void finishKham(DTO.HoSoBenhAnDTO hoso, Action <string> completion) { var processingResult = this.clientBus.KhamProcessing(hoso); completion(processingResult); }
public void updateHoSo(DTO.HoSoBenhAnDTO hoso, Action <string> completion) { var result = this.clientBus.UpdateHoSo(hoso); completion(result); }
public void confirmReception(DTO.HoSoBenhAnDTO hoso, DTO.ThanhToanDTO thanhToan, Action <int, string> completion) { var result = this.clientBus.SaveHoSo(hoso, thanhToan); completion(hoso.SoThuTu, result); }
public void confirmExaminationWithoutAssignTests(DTO.HoSoBenhAnDTO hoso, List <DTO.ChiTietDonThuocDTO> danhSachThuoc, Action <string> completion) { var result = COM.Constant.RES_SUC; completion(result); }
public LatestPrescription(DTO.HoSoBenhAnDTO hoso) { InitializeComponent(); this.hoso = hoso; }
private void btnConfirm_Click(object sender, EventArgs e) { var loaiHoSo = (DTO.LoaiHoSoDTO) this.cbLoaiHoSo.SelectedItem; var nguoiTiepNhan = (DTO.NhanVienDTO) this.cbNguoiTiepNhan.SelectedItem; var phongKham = (DTO.PhongKhamDTO) this.cbPhong.SelectedItem; if (this.patient == null) { return; } var hoso = new DTO.HoSoBenhAnDTO() { MaBenhNhan = this.patient.MaBenhNhan, MaHoSoTruoc = this.cbMaHoSoTruoc.Text, MaLoaiHoSo = loaiHoSo != null ? loaiHoSo.MaLoaiHoSo : "", MaNguoiTN = nguoiTiepNhan != null ? nguoiTiepNhan.MaNV : "", NgayTiepNhan = DateTime.Now.ToString("yyyyMMdd"), YeuCauKham = this.txtYeuCauKham.Text, MaPhongKham = phongKham != null ? phongKham.MaPhong : "" }; var thanhToan = new DTO.ThanhToanDTO() { ChiPhiKham = ClinicManagement.Common.SourceLibrary.PhiKhamTiepNhan }; this.bus.confirmReception(hoso, thanhToan, (stt, result) => { if (result.Equals(COM.Constant.RES_SUC)) { DevExpress.Utils.WaitDialogForm f = new DevExpress.Utils.WaitDialogForm(); f.Show(); Report.FormSoThuTu soThuTuForm = new Report.FormSoThuTu() { AutoSize = true, StartPosition = FormStartPosition.CenterParent, DataReport = new Report.DataReportSoThuTu() { MaHoSo = hoso.MaHoSo, TenBenhNhan = patient.HoTen, DiaChi = patient.DiaChi, NgayKham = DateTime.Now.ToString("dd/MM/yyyy"), SoThuTu = hoso.SoThuTu.ToString(), TenPhong = phongKham?.TenPhong } }; soThuTuForm.FormClosed += (obj, er) => { this.refreshEvent?.Invoke(this, null); if (this.Parent is Form) { var formParent = (Form)this.Parent; formParent.Close(); } }; f.Close(); soThuTuForm.ShowDialog(); } }); }
public MedicalExamination(DTO.HoSoBenhAnDTO hoso) { InitializeComponent(); this.hoSoBenhAn = hoso; this.setupView(); }
public DTO.HoSoBenhAnDTO getHoSoKham(string MaHS) { DTO.HoSoBenhAnDTO hoso = null; this.clientBus.GetInformationHoSo(MaHS, out hoso); return(hoso); }