/// <summary> /// 主界面构造函数1,根据配置文件的设置,初始化可停靠窗体 /// </summary> /// <param name="user"></param> public frmMainForm(IModel user) { InitializeComponent(); this.Text = GetConfig.HospitalName; this.frmDockList = new List <DockForm>(); myMainForm = this; iUser = user; Extender.SetSchema(this.dockPanel, BaseControls.Docking.Extender.Schema.FromBase); m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (GetConfig.DALAndModel == "SIS") { SIS_Model.MUser muser = (SIS_Model.MUser)iUser; this.tssl_User.Text = muser.DOCTOR_NAME; this.tssl_Dept.Text = muser.CLINIC_OFFICE; BuildStruct(); this.initExamInfText(); iGather = (frmImageGather)this.SetFormDisplay("图像采集", "SIS.frmImageGather"); qQuery = (frmQuickQuery)this.SetFormDisplay("快速查询", "SIS.frmQuickQuery"); } else { PACS_Model.MUser muser = (PACS_Model.MUser)iUser; this.tssl_User.Text = muser.USER_NAME; this.tssl_Dept.Text = muser.DEPT_NAME; this.p_Patient.Visible = false; switch (GetConfig.SystemType) { case "DeptManage": BuildStructPacsDeptManage(); break; case "Register": BuildStructPacs(); qQuery = (frmQuickQuery)this.SetFormDisplay("快速查询", "SIS.frmQuickQuery"); break; case "QualityControl": BuildStructPacsQualityControl(); break; } } this.timer_Main.Start(); string configFile = Application.StartupPath + "\\Config\\MainDockPanel.config"; if (File.Exists(configFile)) { dockPanel.LoadFromXml(configFile, m_deserializeDockContent); } for (int i = 0; i < this.frmDockList.Count; i++) { if (!frmDockList[i].isShow) { frmDockList[i].frmDock.Show(this.dockPanel, BaseControls.Docking.DockState.DockLeft); } } }
/// <summary> /// 绑定检查子类 /// </summary> public void BindExamSubClass(string ExamClass, ComboBox cmb_ExamSubClass) { switch (GetConfig.DALAndModel) { case "SIS": this.regUPE.Bind_ExamSubClass(ExamClass, cmb_ExamSubClass); break; case "PACS": PACS_Model.MUser pmUser = (PACS_Model.MUser)frmMainForm.iUser; this.regPacs.Bind_ExamSubClass(pmUser.DB_USER, ExamClass, cmb_ExamSubClass); break; } }
/// <summary> /// 检查类别 /// </summary> public void BindExamClass(ComboBox cmb_ExamClass, int mode) { switch (GetConfig.DALAndModel) { case "SIS": this.regUPE.Bind_ExamClass(cmb_ExamClass, mode); break; case "PACS": PACS_Model.MUser mUser = (PACS_Model.MUser)frmMainForm.iUser; this.regPacs.Bind_ExamClass(mUser.DB_USER, cmb_ExamClass, mode); break; } }
/// <summary> /// 作用:进入锁定界面后,对工号和密码的初始化。 /// 思路:将当前登录用户的ID赋值,密码清空。 /// </summary> /// <param name="iuser"></param> public void initData(IModel iuser) { this.user = iuser; if (GetConfig.DALAndModel == "SIS") { SIS_Model.MUser muser = (SIS_Model.MUser)iuser; this.txt_DoctorId.Text = muser.DOCTOR_ID; } else { PACS_Model.MUser muser = (PACS_Model.MUser)iuser; this.txt_DoctorId.Text = muser.DB_USER; } this.txt_Pwd.Text = ""; }
/// <summary> /// 保存申请单图片 /// </summary> /// <returns>是否保存成功</returns> public bool SaveReqScanImages() { switch (GetConfig.DALAndModel) { case "SIS": SIS_Model.MWorkList smWorkList = (SIS_Model.MWorkList) this.reg.iWorkList; SIS_Model.MUser smUser = (SIS_Model.MUser) this.reg.iUser; return(this.reg.reqScanImage.SaveScanImg(smWorkList.EXAM_ACCESSION_NUM, smUser.DOCTOR_ID)); case "PACS": PACS_Model.MWorkList pmWorkList = (PACS_Model.MWorkList) this.reg.iWorkList; PACS_Model.MUser pmUser = (PACS_Model.MUser) this.reg.iUser; return(this.reg.reqScanImage.SaveScanImg(pmWorkList.EXAM_ACCESSION_NUM, pmUser.DB_USER)); default: return(false); } }
/// <summary> /// 绑定科室 /// </summary> private void DeptBind() { this.cmb_Dept.DataSource = bDept.GetList(" 1=1 "); string ExamDept = ""; if (GetConfig.DALAndModel == "SIS") { this.cmb_Dept.DisplayMember = "CLINIC_OFFICE"; this.cmb_Dept.ValueMember = "CLINIC_OFFICE_CODE"; SIS_Model.MUser smUser = (SIS_Model.MUser) this.iUser; ExamDept = smUser.CLINIC_OFFICE_CODE; } else { this.cmb_Dept.DisplayMember = "DEPT_NAME"; this.cmb_Dept.ValueMember = "DEPT_CODE"; PACS_Model.MUser pmUser = (PACS_Model.MUser) this.iUser; ExamDept = pmUser.USER_DEPT; } this.cmb_Dept.SelectedValue = ExamDept; }
/// <summary> /// 作用:执行解锁验证。 /// 思路:将登录成功的用户信息与输入的密码判断。 /// </summary> private void Check() { string pwd = ""; if (GetConfig.DALAndModel == "SIS") { SIS_Model.MUser muser = (SIS_Model.MUser)user; pwd = muser.DOCTOR_PWD; } else { PACS_Model.MUser muser = (PACS_Model.MUser)user; pwd = muser.USER_PWD; } if (this.txt_Pwd.Text == pwd) { this.DialogResult = DialogResult.OK; } else { MessageBoxEx.Show("密码错", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
/// <summary> /// 作用:对登录用户的身份验证。 /// 思路:对输入的用户工号和密码,实例化一个用户,并查询数据库用户表 /// </summary> /// <returns></returns> private bool CheckUser() { if (GetConfig.DALAndModel == "SIS") { SIS_Model.MUser muser = (SIS_Model.MUser)user; muser.DOCTOR_ID = this.txt_DoctorId.Text.Trim().ToString(); muser.DOCTOR_PWD = this.txt_Pwd.Text.Trim().ToString(); } else { PACS_Model.MUser muser = (PACS_Model.MUser)user; muser.DB_USER = this.txt_DoctorId.Text.Trim().ToString(); muser.USER_PWD = this.txt_Pwd.Text.Trim().ToString(); } try { return(new BUser().Exists(user)); } catch (Exception ex) { MessageBoxEx.Show(ex.Message); return(false); } }
/// <summary> /// 更新放射科的用户信息 /// </summary> private void UpdatePACSUser() { BUser buser = new BUser(); PACS_Model.MUser user = (PACS_Model.MUser)buser.GetModel(this.tx_LoginName.Text.Trim()); if (user == null) { MessageBoxEx.Show("输入的工号不存在,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { if (user.USER_PWD != this.tx_OldPwd.Text.Trim()) { MessageBoxEx.Show("旧密码不正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { user.USER_PWD = this.tx_NewPwd.Text.Trim(); buser.Update((ILL.IModel)user, " where DB_USER='******'"); MessageBoxEx.Show("修改密码成功,请记住您的新密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Close(); } } }
public void BindRegDatas(SIS.frmRegister reg) { reg.Mode = "6"; if (GetConfig.hisVisit) { switch (GetConfig.hisVender) { case "JW": reg.computeCharge.DT_VS = this.regJW.Bind_ExamVsCharge(); reg.dt_ReferDept = this.regJW.Bind_ReferDept(reg.cmb_ReferDept); this.regJW.Bind_ChargeType(reg.cmb_ChargeType); break; case "HT": break; } } else { switch (GetConfig.DALAndModel) { case "SIS": reg.computeCharge.DT_VS = this.regUPE.Bind_ExamVsCharge(); reg.dt_ReferDept = this.regUPE.Bind_ReferDept(reg.cmb_ReferDept); this.regUPE.Bind_ChargeType(reg.cmb_ChargeType); break; case "PACS": reg.computeCharge.DT_VS = this.regPacs.Bind_ExamVsCharge(); reg.dt_ReferDept = this.regPacs.Bind_ReferDept(reg.cmb_ReferDept); this.regPacs.Bind_ChargeType(reg.cmb_ChargeType); break; } } switch (GetConfig.DALAndModel) { case "SIS": this.regUPE.Bind_ImgEquipment(reg.cmb_ImgEquipment, frmMainForm.iUser); this.regUPE.Bind_ExamDept(reg.cmb_ExamDept); this.regUPE.Bind_PatientSource(reg.cmb_PatientSource); reg.dt_AREA = this.regUPE.Bind_AreaDict(reg.cmb_BirthPlace); this.regUPE.Bind_ExamClass(reg.cmb_ExamClass, GetConfig.RM_RegisterMode); this.regUPE.Bind_ExamGroup(reg.cmb_ExamGroup, reg.iUser, false); break; case "PACS": this.regPacs.Bind_ExamDept(reg.cmb_ExamDept); this.regPacs.Bind_PatientSource(reg.cmb_PatientSource); reg.dt_AREA = this.regPacs.Bind_AreaDict(reg.cmb_BirthPlace); PACS_Model.MUser mUser = (PACS_Model.MUser)reg.iUser; this.regPacs.Bind_ExamClass(mUser.DB_USER, reg.cmb_ExamClass, GetConfig.RM_RegisterMode); this.regPacs.Bind_ExamGroup(reg.cmb_ExamGroup, reg.iUser, false); break; } if (GetConfig.LM_IsLocalMode == 1 && GetConfig.LM_LocalIdMode != 0) { reg.dud_PatientLocalId.ShowUpDownButton = true; } else { reg.dud_PatientLocalId.ShowUpDownButton = false; } }
/// <summary> /// 开始新的检查登记 /// </summary> public bool NewExam() { if (!this.IsNeedSave()) { return(false); } this.reg.Mode = "6"; TextBoxClear(); this.reg.reqScanImage.NewScan(); this.reg.Mode = "7"; this.reg.localIdCreater.Init(); this.reg.iWorkList = DALFactory.Model.CreateMWorkList(); this.reg.iPatientInfLocalId = DALFactory.Model.CreateMPatientInfLocalId(); this.reg.iArchives = DALFactory.Model.CreateMArchives(); this.reg.IsNew = false; this.reg.computeCharge.Init(); this.reg.cmb_AgeUnit.SelectedIndex = 0; this.reg.cmb_ExamClass.SelectedIndex = 0; this.reg.cmb_Sex.SelectedIndex = 0; this.reg.cmb_ExamDept.Text = GetConfig.ExamDeptName; this.reg.cmb_ExamDept.SelectedValue = GetConfig.ExamDeptCode; CtlComboBox.SetDisplay("标准", this.reg.cmb_ChargeType); CtlComboBox.SetDisplay(GetConfig.RM_DefaultSex, this.reg.cmb_Sex); this.reg.dtp_Birth.Value = DateTime.Now; this.reg.dtp_ReqDateTime.Value = System.DateTime.Now; this.reg.dtp_ScheduledDate.Value = System.DateTime.Now; this.reg.dtp_ScheduledDate.Checked = false; //add by liu kun at 2010-6-30 默认不选中 CtlComboBox.SetDisplay(GetConfig.Group, this.reg.cmb_ExamGroup); switch (GetConfig.DALAndModel) { case "SIS": SIS_Model.MUser smUser = (SIS_Model.MUser) this.reg.iUser; SIS_Model.MWorkList smWorkList = (SIS_Model.MWorkList) this.reg.iWorkList; smWorkList.SCH_OPERATOR = smUser.DOCTOR_ID; smWorkList.EXAM_DEPT = smUser.CLINIC_OFFICE_CODE; smWorkList.EXAM_DEPT_NAME = smUser.CLINIC_OFFICE; smWorkList.IS_BACK_INQ = 0; smWorkList.IS_CONFIRMED = 1; smWorkList.IS_INQUIRY = 0; smWorkList.IS_TEMPORARY = 0; smWorkList.REPORT_STATUS = 0; smWorkList.IS_ONLINE = 1; smWorkList.IS_PACKPROCESS = 0; smWorkList.IMAGE_COUNTS = 0; CtlComboBox.SetDisplay(GetConfig.ImgEquipment, this.reg.cmb_ImgEquipment); CtlComboBox.SetDisplay(smUser.DOCTOR_NAME, this.reg.cmb_ExamDoctor); break; case "PACS": PACS_Model.MUser pmUser = (PACS_Model.MUser) this.reg.iUser; PACS_Model.MWorkList pmWorkList = (PACS_Model.MWorkList) this.reg.iWorkList; pmWorkList.SCH_OPERATOR = pmUser.DB_USER; pmWorkList.EXAM_DEPT = pmUser.USER_DEPT; pmWorkList.EXAM_DEPT_NAME = pmUser.DEPT_NAME; pmWorkList.IS_CONFIRMED = 1; pmWorkList.IS_TEMPORARY = 0; pmWorkList.REPORT_STATUS = 0; break; } if (!this.NewExamAccessionNum()) { MessageBoxEx.Show("无法生成检查申请序号,不能进行登记!", "错误"); return(false); } this.reg.btn_OpenRpt.Enabled = false; this.reg.lb_Notice.Text = "新检查登记:请在红色输入框中输入病人信息,查找检查申请记录!"; this.reg.dtp_ScheduledDate.Checked = false; //add by liukun at 2010-7-30 预约时间默认为不选中 this.reg.groupBox_OrderNotice.Enabled = false; //add by liukun at 2010-7-30 预约注意事项默认为不编辑 return(true); }