private void dataTableView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } MedicalQcMsg medicalQcMsg = this.dataTableView2.Rows[e.RowIndex].Tag as MedicalQcMsg; if (medicalQcMsg == null) { return; } QcMsgDict qcMsgDict = null; QcMsgDictAccess.Instance.GetQcMsgDict(medicalQcMsg.QC_MSG_CODE, ref qcMsgDict); PatVisitInfo patVisit = new PatVisitInfo(); patVisit.PATIENT_ID = medicalQcMsg.PATIENT_ID; patVisit.VISIT_ID = medicalQcMsg.VISIT_ID; patVisit.VISIT_NO = medicalQcMsg.VISIT_NO; this.MainForm.SwitchPatient(patVisit); PatientPageForm patientPageForm = this.MainForm.GetPatientPageForm(patVisit); if (string.IsNullOrEmpty(qcMsgDict.MESSAGE_TITLE) || qcMsgDict.QA_EVENT_TYPE.Contains("入院记录")) { patientPageForm.LoadModule(medicalQcMsg.QA_EVENT_TYPE); } else { patientPageForm.LoadModule(qcMsgDict.MESSAGE_TITLE); } }
/// <summary> /// 是否需要显示同一患者的相同列 /// </summary> /// <param name="row"></param> /// <returns></returns> private bool IsNeedShowSamePatientColumn(int rowIndex, MedicalQcMsg currentQCQuestionInfo) { if (SystemParam.Instance.LocalConfigOption.IsShowSameColumn) { return(true); } else//判断是否是同一个患者,是则不需要显示 { if (rowIndex == 0 || currentQCQuestionInfo == null) { return(true); } MedicalQcMsg preQCQuestionInfo = this.dataGridView1.Rows[rowIndex - 1].Tag as MedicalQcMsg; if (preQCQuestionInfo == null) { return(true); } if (preQCQuestionInfo.PATIENT_ID == currentQCQuestionInfo.PATIENT_ID && preQCQuestionInfo.VISIT_ID == currentQCQuestionInfo.VISIT_ID) { return(false); } else { return(true); } } }
/// <summary> /// 新增整改通知书 /// </summary> private void InsertModifyNotice(QcModifyNotice qcModifyNotice) { if (MessageBoxEx.ShowConfirm("评分结果将以消息形式发送到医生工作台,确认发送通知书吗?") != DialogResult.OK) { return; } qcModifyNotice.MODIFY_NOTICE_ID = qcModifyNotice.MakeID(); qcModifyNotice.MODIFY_PERIOD = this.cbo_MODIFY_PERIOD.Text; qcModifyNotice.MODIFY_REMARK = this.rtb_MODIFY_REMARK.Text; qcModifyNotice.MODIFY_SCORE = float.Parse(this.lbl_MODIFY_SCORE.Text); qcModifyNotice.NOTICE_TIME = DateTime.Parse(this.lbl_NOTICE_TIME.Text); qcModifyNotice.PATIENT_ID = SystemParam.Instance.PatVisitInfo.PATIENT_ID; qcModifyNotice.PATIENT_NAME = SystemParam.Instance.PatVisitInfo.PATIENT_NAME; qcModifyNotice.QC_DEPT_CODE = SystemParam.Instance.UserInfo.DEPT_CODE; qcModifyNotice.QC_DEPT_NAME = SystemParam.Instance.UserInfo.DEPT_NAME; qcModifyNotice.QC_LEVEL = SystemData.QcLevel.GetCodeByMrStatus(SystemParam.Instance.PatVisitInfo.MR_STATUS); qcModifyNotice.QC_MAN = SystemParam.Instance.UserInfo.USER_NAME; qcModifyNotice.QC_MAN_ID = SystemParam.Instance.UserInfo.USER_ID; qcModifyNotice.RECEIVER = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR; qcModifyNotice.RECEIVER_ID = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR_ID; qcModifyNotice.RECEIVER_DEPT_CODE = SystemParam.Instance.PatVisitInfo.DEPT_CODE; qcModifyNotice.RECEIVER_DEPT_NAME = SystemParam.Instance.PatVisitInfo.DEPT_NAME; qcModifyNotice.VISIT_ID = SystemParam.Instance.PatVisitInfo.VISIT_ID; qcModifyNotice.VISIT_NO = SystemParam.Instance.PatVisitInfo.VISIT_NO; qcModifyNotice.NOTICE_STATUS = SystemData.NotifyStatus.Sended; short shRet = QcModifyNoticeAccess.Instance.Insert(qcModifyNotice); //新增质检信息 更新人工质控结果 新增 foreach (DataGridViewRow item in this.dataTableView1.Rows) { QcCheckResult qcCheckResult = item.Tag as QcCheckResult; qcCheckResult.MODIFY_NOTICE_ID = qcModifyNotice.MODIFY_NOTICE_ID; MedicalQcMsg medicalQcMsg = item.Cells[this.col_MSG_ID.Index].Tag as MedicalQcMsg; UserInfo userInfo = item.Cells[this.col_INCHARGE_DOCTOR.Index].Tag as UserInfo; if (userInfo != null) { qcCheckResult.DEPT_CODE = userInfo.DEPT_CODE; qcCheckResult.DEPT_IN_CHARGE = userInfo.DEPT_NAME; qcCheckResult.INCHARGE_DOCTOR = userInfo.USER_NAME; qcCheckResult.INCHARGE_DOCTOR_ID = userInfo.USER_ID; } if (medicalQcMsg == null) { medicalQcMsg = this.ToQcMsg(qcCheckResult); shRet = MedicalQcMsgAccess.Instance.Insert(medicalQcMsg); } qcCheckResult.MSG_ID = medicalQcMsg.MSG_ID; shRet = QcCheckResultAccess.Instance.Update(qcCheckResult); } if (shRet == SystemData.ReturnValue.OK) { MessageBoxEx.ShowMessage("发送成功"); this.lbl_NOTICE_STATUS.Text = SystemData.NotifyStatus.GetCnName(qcModifyNotice.NOTICE_STATUS); this.lbl_NOTICE_STATUS.ForeColor = Color.Blue; this.herenButton1.Text = "修改整改通知单"; } }
private void dataTableView2_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == this.col_2_btnPass.Index) { MedicalQcMsg qcMsg = this.dataTableView2.Rows[e.RowIndex].Tag as MedicalQcMsg; PassQcMsg(qcMsg); } if (e.ColumnIndex == this.col_2_btnReject.Index) { MedicalQcMsg qcMsg = this.dataTableView2.Rows[e.RowIndex].Tag as MedicalQcMsg; RejectQcMsg(qcMsg); } }
private void RejectQcMsg(MedicalQcMsg qcMsg) { if (MessageBoxEx.ShowConfirm("您对该问题整改情况驳回重改吗?") == DialogResult.OK) { qcMsg.MSG_STATUS = SystemData.MsgStatus.UnCheck; short shRet = MedicalQcMsgAccess.Instance.Update(qcMsg); if (shRet == SystemData.ReturnValue.OK) { MessageBoxEx.ShowMessage("操作成功"); RefreshDataTable1(qcMsg); } else { MessageBoxEx.ShowError("驳回操作失败"); } } }
/// <summary> /// 人工检查结果转为消息对象 /// </summary> /// <param name="qcCheckResult"></param> /// <returns></returns> private MedicalQcMsg ToQcMsg(QcCheckResult qcCheckResult) { MedicalQcMsg medicalQcMsg = new MedicalQcMsg(); medicalQcMsg.APPLY_ENV = "MEDDOC"; medicalQcMsg.CREATOR_ID = qcCheckResult.CREATE_ID; medicalQcMsg.DEPT_NAME = qcCheckResult.DEPT_IN_CHARGE; medicalQcMsg.DEPT_STAYED = qcCheckResult.DEPT_CODE; medicalQcMsg.ERROR_COUNT = qcCheckResult.ERROR_COUNT; medicalQcMsg.DOCTOR_IN_CHARGE = qcCheckResult.INCHARGE_DOCTOR; medicalQcMsg.ISSUED_BY = qcCheckResult.CHECKER_NAME; medicalQcMsg.ISSUED_DATE_TIME = SysTimeHelper.Instance.Now; medicalQcMsg.ISSUED_ID = qcCheckResult.CHECKER_ID; medicalQcMsg.ISSUED_TYPE = SystemData.IssuedType.NORMAL; medicalQcMsg.LOCK_STATUS = false; medicalQcMsg.LogDesc = string.Empty; medicalQcMsg.MESSAGE = qcCheckResult.MSG_DICT_MESSAGE; medicalQcMsg.MSG_STATUS = SystemData.MsgStatus.UnCheck; medicalQcMsg.PARENT_DOCTOR = string.Empty; medicalQcMsg.PATIENT_ID = qcCheckResult.PATIENT_ID; medicalQcMsg.PATIENT_NAME = qcCheckResult.PATIENT_NAME; medicalQcMsg.POINT = qcCheckResult.SCORE; medicalQcMsg.POINT_TYPE = SystemData.PointType.Artific; medicalQcMsg.QA_EVENT_TYPE = qcCheckResult.QA_EVENT_TYPE; medicalQcMsg.QCDOC_TYPE = SystemData.QCDocType.OUTHOSPITAL; medicalQcMsg.QC_MODULE = "DOCTOR_MR"; medicalQcMsg.QC_MSG_CODE = qcCheckResult.MSG_DICT_CODE; medicalQcMsg.SUPER_DOCTOR = string.Empty; medicalQcMsg.TOPIC = qcCheckResult.DOC_TITLE; medicalQcMsg.TOPIC_ID = qcCheckResult.DOC_SETID; medicalQcMsg.VISIT_ID = qcCheckResult.VISIT_ID; medicalQcMsg.VISIT_NO = qcCheckResult.VISIT_NO; medicalQcMsg.MODIFY_NOTICE_ID = qcCheckResult.MODIFY_NOTICE_ID; medicalQcMsg.DOCTOR_IN_CHARGE_ID = qcCheckResult.INCHARGE_DOCTOR_ID; return(medicalQcMsg); }
private void RefreshDataTable1(MedicalQcMsg qcMsg) { this.dataTableView1.SelectedRows[0].Tag = qcMsg; this.dataTableView2.SelectedRows[0].Tag = qcMsg; }
/// <summary> /// 修改整改通知书 /// </summary> private void UpdateModifyNotice(QcModifyNotice qcModifyNotice) { qcModifyNotice.MODIFY_PERIOD = this.cbo_MODIFY_PERIOD.Text; qcModifyNotice.MODIFY_REMARK = this.rtb_MODIFY_REMARK.Text; qcModifyNotice.MODIFY_SCORE = float.Parse(this.lbl_MODIFY_SCORE.Text); qcModifyNotice.NOTICE_TIME = DateTime.Parse(this.lbl_NOTICE_TIME.Text); qcModifyNotice.PATIENT_ID = SystemParam.Instance.PatVisitInfo.PATIENT_ID; qcModifyNotice.QC_DEPT_CODE = SystemParam.Instance.UserInfo.DEPT_CODE; qcModifyNotice.QC_DEPT_NAME = SystemParam.Instance.UserInfo.DEPT_NAME; qcModifyNotice.QC_LEVEL = SystemData.QcLevel.GetCodeByMrStatus(SystemParam.Instance.PatVisitInfo.MR_STATUS); qcModifyNotice.QC_MAN = SystemParam.Instance.UserInfo.USER_NAME; qcModifyNotice.QC_MAN_ID = SystemParam.Instance.UserInfo.USER_ID; qcModifyNotice.RECEIVER = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR; qcModifyNotice.RECEIVER_ID = SystemParam.Instance.PatVisitInfo.INCHARGE_DOCTOR_ID; qcModifyNotice.RECEIVER_DEPT_CODE = SystemParam.Instance.PatVisitInfo.DEPT_CODE; qcModifyNotice.RECEIVER_DEPT_NAME = SystemParam.Instance.PatVisitInfo.DEPT_NAME; qcModifyNotice.VISIT_ID = SystemParam.Instance.PatVisitInfo.VISIT_ID; qcModifyNotice.VISIT_NO = SystemParam.Instance.PatVisitInfo.VISIT_NO; qcModifyNotice.NOTICE_STATUS = SystemData.NotifyStatus.Sended; qcModifyNotice.NOTICE_TIME = SysTimeHelper.Instance.Now; short shRet = QcModifyNoticeAccess.Instance.Update(qcModifyNotice); //更新人工质控和质检信息 更新人工质控责任医生和责任科室,同步更新反馈消息 foreach (DataGridViewRow item in this.dataTableView1.Rows) { QcCheckResult qcCheckResult = item.Tag as QcCheckResult; qcCheckResult.MODIFY_NOTICE_ID = qcModifyNotice.MODIFY_NOTICE_ID; MedicalQcMsg medicalQcMsg = item.Cells[this.col_MSG_ID.Index].Tag as MedicalQcMsg; UserInfo userInfo = item.Cells[this.col_INCHARGE_DOCTOR.Index].Tag as UserInfo; if (userInfo != null) { qcCheckResult.DEPT_CODE = userInfo.DEPT_CODE; qcCheckResult.DEPT_IN_CHARGE = userInfo.DEPT_NAME; qcCheckResult.INCHARGE_DOCTOR = userInfo.USER_NAME; qcCheckResult.INCHARGE_DOCTOR_ID = userInfo.USER_ID; } if (medicalQcMsg == null) { medicalQcMsg = this.ToQcMsg(qcCheckResult); shRet = MedicalQcMsgAccess.Instance.Insert(medicalQcMsg); item.Cells[this.col_MSG_ID.Index].Tag = medicalQcMsg; } else { if (userInfo != null) { medicalQcMsg.DEPT_STAYED = userInfo.DEPT_CODE; medicalQcMsg.DEPT_NAME = userInfo.DEPT_NAME; medicalQcMsg.DOCTOR_IN_CHARGE = userInfo.USER_NAME; medicalQcMsg.DOCTOR_IN_CHARGE_ID = userInfo.USER_ID; shRet = MedicalQcMsgAccess.Instance.Update(medicalQcMsg); } } qcCheckResult.MSG_ID = medicalQcMsg.MSG_ID; shRet = QcCheckResultAccess.Instance.Update(qcCheckResult); } if (shRet == SystemData.ReturnValue.OK) { MessageBoxEx.ShowMessage("修改成功"); this.lbl_NOTICE_STATUS.Text = SystemData.NotifyStatus.GetCnName(qcModifyNotice.NOTICE_STATUS); this.lbl_NOTICE_TIME.Text = this.m_QcModifyNotice.NOTICE_TIME.ToString("yyyy-MM-dd HH:mm"); this.lbl_NOTICE_STATUS.ForeColor = Color.Blue; } this.Tag = qcModifyNotice; }