/// <summary> /// 三级医生信息从历史表里读取 /// </summary> /// <param name="lstPatDoctorInfos"></param> /// <returns></returns> private void UpdateInchargeDoctor(List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos) { //有选择经治医生,直接绑定 UserInfo userInfo = this.cobRequestDoc.SelectedItem as UserInfo; if (userInfo != null) { foreach (DataGridViewRow row in this.dataGridView1.Rows) { row.Cells[this.colDoctor.Index].Value = userInfo.USER_NAME; } } //一次查询一批患者的三级患者信息 //获取三级医生信息 if (lstPatDoctorInfos == null) { return; } short shRet = PatVisitAccess.Instance.GetPatSanjiDoctors(ref lstPatDoctorInfos); if (shRet != EMRDBLib.SystemData.ReturnValue.OK) { return; } foreach (DataGridViewRow row in this.dataGridView1.Rows) { EMRDBLib.PatVisitInfo patVistiLog = row.Tag as EMRDBLib.PatVisitInfo; if (patVistiLog == null) { continue; } EMRDBLib.PatDoctorInfo patDoctorInfo = lstPatDoctorInfos.Find(delegate(EMRDBLib.PatDoctorInfo p) { if (p.PatientID == patVistiLog.PATIENT_ID && p.VisitID == patVistiLog.VISIT_ID) { return(true); } else { return(false); } }); if (patDoctorInfo != null) { row.Cells[this.colDoctor.Index].Value = patDoctorInfo.RequestDoctorName; } } }
/// <summary> /// 将数据信息加载到DataGridView中 /// </summary> /// <param name="row"></param> /// <param name="qcWorkloadStatInfo"></param> private void SetRowData(DataGridViewRow row, EMRDBLib.PatVisitInfo patVisitLog, EMRDBLib.PatDoctorInfo patDoctorInfo) { if (row == null || patVisitLog == null) { return; } if (row.DataGridView == null) { return; } row.Cells[this.colDeptName.Index].Value = patVisitLog.DEPT_NAME; row.Cells[this.colPatientID.Index].Value = patVisitLog.PATIENT_ID; row.Cells[this.colPatientName.Index].Value = patVisitLog.PATIENT_NAME; row.Cells[this.colPatSex.Index].Value = patVisitLog.PATIENT_SEX; row.Cells[this.colVisitID.Index].Value = patVisitLog.VISIT_ID; row.Cells[this.colVisitTime.Index].Value = patVisitLog.VISIT_TIME.ToString("yyyy-MM-dd"); row.Cells[this.colChargeType.Index].Value = patVisitLog.CHARGE_TYPE; row.Cells[this.colAge.Index].Value = GlobalMethods.SysTime.GetAgeText(patVisitLog.BIRTH_TIME, DateTime.Now); row.Cells[this.colDischargeTime.Index].Value = patVisitLog.DISCHARGE_TIME.ToString("yyyy-MM-dd"); row.Cells[this.colDiagnosis.Index].Value = patVisitLog.DIAGNOSIS; TimeSpan timeSpan = patVisitLog.DISCHARGE_TIME - patVisitLog.VISIT_TIME; row.Cells[this.colCost.Index].Value = patVisitLog.TOTAL_COSTS; row.Cells[this.colRequestDoc.Index].Value = patVisitLog.INCHARGE_DOCTOR; if (patDoctorInfo != null) { row.Cells[this.colRequestDoc.Index].Value = patDoctorInfo.RequestDoctorName; //开启三级医生审核的显示上级 、主任 row.Cells[this.colParentDoc.Index].Value = patDoctorInfo.ParentDoctorName; row.Cells[this.colSuperDoc.Index].Value = patDoctorInfo.SuperDoctorName; } row.Tag = patVisitLog; }
private void btnQuery_Click(object sender, EventArgs e) { DeptInfo deptInfo = this.cboDeptName.SelectedItem as DeptInfo; string szDeptCode = null; if (deptInfo != null) { szDeptCode = deptInfo.DEPT_CODE; } if (string.IsNullOrEmpty(this.cboDeptName.Text)) { szDeptCode = null; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在查询数据,请稍候..."); this.dataGridView1.Rows.Clear(); List <EMRDBLib.PatVisitInfo> lstPatVisitLog = null; short shRet = PatVisitAccess.Instance.GetPatientListByDisChargeTime(null, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")), DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), szDeptCode, ref lstPatVisitLog); if (shRet != SystemData.ReturnValue.OK && shRet != SystemData.ReturnValue.RES_NO_FOUND) { GlobalMethods.UI.SetCursor(this, Cursors.Default); MessageBoxEx.Show("查询数据失败!"); return; } if (lstPatVisitLog == null || lstPatVisitLog.Count <= 0) { GlobalMethods.UI.SetCursor(this, Cursors.Default); MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information); return; } List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>(); Hashtable hashtable = new Hashtable(); for (int index = 0; index < lstPatVisitLog.Count; index++) { EMRDBLib.PatVisitInfo patLog = lstPatVisitLog[index]; if (!hashtable.ContainsKey(patLog.PATIENT_ID + patLog.VISIT_ID)) { EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo(); patDoctorInfo.PatientID = patLog.PATIENT_ID; patDoctorInfo.VisitID = patLog.VISIT_ID; hashtable.Add(patLog.PATIENT_ID + patLog.VISIT_ID, patDoctorInfo); lstPatDoctorInfos.Add(patDoctorInfo); } } //获取三级医生信息 shRet = PatVisitAccess.Instance.GetPatSanjiDoctors(ref lstPatDoctorInfos); for (int index = 0; index < lstPatVisitLog.Count; index++) { EMRDBLib.PatVisitInfo patVisitLog = lstPatVisitLog[index]; int nRowIndex = this.dataGridView1.Rows.Add(); DataGridViewRow row = this.dataGridView1.Rows[nRowIndex]; EMRDBLib.PatDoctorInfo patDoctorInfo = lstPatDoctorInfos.Find(delegate(EMRDBLib.PatDoctorInfo p) { if (p.PatientID == lstPatVisitLog[index].PATIENT_ID && p.VisitID == lstPatVisitLog[index].VISIT_ID) { return(true); } else { return(false); } }); this.SetRowData(row, patVisitLog, patDoctorInfo); } #region 重新绑定出院诊断 List <EMRDBLib.Diagnosis> lstDiagnosInfo = new List <EMRDBLib.Diagnosis>(); shRet = PatVisitAccess.Instance.GetOutPatientFirstDiagnosis(lstPatVisitLog, lstDiagnosInfo); if (shRet == SystemData.ReturnValue.OK && lstDiagnosInfo.Count > 0) { for (int index = 0; index < this.dataGridView1.Rows.Count; index++) { DataGridViewRow row = this.dataGridView1.Rows[index]; EMRDBLib.PatVisitInfo patVisitLog = row.Tag as EMRDBLib.PatVisitInfo; if (patVisitLog == null) { continue; } EMRDBLib.Diagnosis diagnosisInfo = lstDiagnosInfo.Find( delegate(EMRDBLib.Diagnosis p) { return(p.PATIENT_ID == patVisitLog.PATIENT_ID && p.VISIT_ID == patVisitLog.VISIT_ID); }); if (diagnosisInfo != null) { row.Cells[this.colDiagnosis.Index].Value = string.Format("{0}({1})", diagnosisInfo.DIAGNOSIS_DESC, string.IsNullOrEmpty(diagnosisInfo.TREAT_RESULT) ? "未知" : diagnosisInfo.TREAT_RESULT); } } } #endregion #region 重新绑定费用 PatVisitAccess.Instance.GetPatConstInfo(ref lstPatVisitLog); if (lstPatVisitLog == null || lstPatVisitLog.Count <= 0) { GlobalMethods.UI.SetCursor(this, Cursors.Default); MessageBoxEx.Show("费用信息查询失败!", MessageBoxIcon.Information); return; } for (int index = 0; index < this.dataGridView1.Rows.Count; index++) { DataGridViewRow row = this.dataGridView1.Rows[index]; EMRDBLib.PatVisitInfo patVisitLog = row.Tag as EMRDBLib.PatVisitInfo; if (patVisitLog == null) { continue; } EMRDBLib.PatVisitInfo findPatVisitLog = lstPatVisitLog.Find( delegate(EMRDBLib.PatVisitInfo p) { return(p.PATIENT_ID == patVisitLog.PATIENT_ID && p.VISIT_ID == patVisitLog.VISIT_ID); }); if (findPatVisitLog != null) { row.Cells[this.colCost.Index].Value = Math.Round(findPatVisitLog.TOTAL_COSTS, 2).ToString(); } } #endregion this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); }
private void btnQuery_Click(object sender, EventArgs e) { DeptInfo deptInfo = this.cboDeptName.SelectedItem as DeptInfo; string szDeptCode = null; if (deptInfo != null) { szDeptCode = deptInfo.DEPT_CODE; } if (string.IsNullOrEmpty(this.cboDeptName.Text)) { szDeptCode = null; } GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在查询数据,请稍候..."); this.dataGridView1.Rows.Clear(); List <EMRDBLib.PatVisitInfo> lstPatVisitLog = null; short shRet = PatVisitAccess.Instance.GetDeathPatList(szDeptCode, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")), DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstPatVisitLog); if (shRet != SystemData.ReturnValue.OK && shRet != SystemData.ReturnValue.RES_NO_FOUND) { GlobalMethods.UI.SetCursor(this, Cursors.Default); this.ShowStatusMessage(null); MessageBoxEx.Show("查询数据失败!"); return; } if (lstPatVisitLog == null || lstPatVisitLog.Count <= 0) { GlobalMethods.UI.SetCursor(this, Cursors.Default); this.ShowStatusMessage(null); MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information); return; } #region 级医生信息 List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>(); Hashtable hashtable = new Hashtable(); for (int index = 0; index < lstPatVisitLog.Count; index++) { PatVisitInfo patInfo = lstPatVisitLog[index]; if (!hashtable.ContainsKey(patInfo.PATIENT_ID + patInfo.VISIT_ID)) { EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo(); patDoctorInfo.PatientID = patInfo.PATIENT_ID; patDoctorInfo.VisitID = patInfo.VISIT_ID; hashtable.Add(patInfo.PATIENT_ID + patInfo.VISIT_ID, patDoctorInfo); lstPatDoctorInfos.Add(patDoctorInfo); } } //获取三级医生信息 shRet = PatVisitAccess.Instance.GetPatSanjiDoctors(ref lstPatDoctorInfos); string pre = null; int nRowIndex = 0; #endregion for (int index = 0; index < lstPatVisitLog.Count; index++) { EMRDBLib.PatVisitInfo patVisitLog = lstPatVisitLog[index]; if (pre != string.Format("{0}_{1}", patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID)) { nRowIndex = this.dataGridView1.Rows.Add(); pre = string.Format("{0}_{1}", patVisitLog.PATIENT_ID, patVisitLog.VISIT_ID); } DataGridViewRow row = this.dataGridView1.Rows[nRowIndex]; EMRDBLib.PatDoctorInfo patDoctorInfo = lstPatDoctorInfos.Find(delegate(EMRDBLib.PatDoctorInfo p) { if (p.PatientID == lstPatVisitLog[index].PATIENT_ID && p.VisitID == lstPatVisitLog[index].VISIT_ID) { return(true); } else { return(false); } }); this.SetRowData(row, patVisitLog, patDoctorInfo); } this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); }
/// <summary> /// 将数据信息加载到DataGridView中 /// </summary> /// <param name="row"></param> /// <param name="qcWorkloadStatInfo"></param> private void SetRowData(DataGridViewRow row, EMRDBLib.MedicalQcMsg qcQuesiontionInfo, EMRDBLib.PatDoctorInfo patDoctorInfo) { if (row == null || qcQuesiontionInfo == null) { return; } if (row.DataGridView == null) { return; } row.Tag = qcQuesiontionInfo; row.Cells[this.col_BED_CODE.Index].Value = qcQuesiontionInfo.BED_CODE; row.Cells[this.colInpNO.Index].Value = qcQuesiontionInfo.InpNo; row.Cells[this.colPatientName.Index].Value = qcQuesiontionInfo.PATIENT_NAME; row.Cells[this.colPatientID.Index].Value = qcQuesiontionInfo.PATIENT_ID; row.Cells[this.colVisitID.Index].Value = qcQuesiontionInfo.VISIT_ID; row.Cells[this.colTopic.Index].Value = qcQuesiontionInfo.TOPIC; row.Cells[this.colCheckName.Index].Value = qcQuesiontionInfo.ISSUED_BY; row.Cells[this.colDeptName.Index].Value = qcQuesiontionInfo.DEPT_NAME; row.Cells[this.colDiagnosis.Index].Value = qcQuesiontionInfo.Diagnosis; row.Cells[this.colContent.Index].Value = qcQuesiontionInfo.MESSAGE; row.Cells[this.colQaEventType.Index].Value = qcQuesiontionInfo.QA_EVENT_TYPE; row.Cells[this.colLogDesc.Index].Value = qcQuesiontionInfo.LogDesc == null? "质控者添加质检信息":qcQuesiontionInfo.LogDesc; row.Cells[this.colRequestDoctor.Index].Value = qcQuesiontionInfo.DOCTOR_IN_CHARGE; if (patDoctorInfo != null) { row.Cells[this.colRequestDoctor.Index].Value = patDoctorInfo.RequestDoctorName; row.Cells[this.colPARENT_DOCTOR.Index].Value = patDoctorInfo.ParentDoctorName; row.Cells[this.colSuperDoctor.Index].Value = patDoctorInfo.SuperDoctorName; } }
private void btnQuery_Click(object sender, EventArgs e) { string szCheckerName = this.cboUserList.Text; GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在统计工作量,请稍候..."); this.dataGridView1.Rows.Clear(); List <EMRDBLib.MedicalQcMsg> lstQCQuestionInfos = null; short shRet = MedicalQcMsgAccess.Instance.GetQCQuestionListByChecker(szCheckerName, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")), DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstQCQuestionInfos); if (shRet != SystemData.ReturnValue.OK && shRet != SystemData.ReturnValue.RES_NO_FOUND) { GlobalMethods.UI.SetCursor(this, Cursors.Default); MessageBoxEx.Show("查询数据失败!"); return; } if (lstQCQuestionInfos == null || lstQCQuestionInfos.Count <= 0) { GlobalMethods.UI.SetCursor(this, Cursors.Default); MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information); this.ShowStatusMessage(null); return; } List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>(); Hashtable hashtable = new Hashtable(); for (int index = 0; index < lstQCQuestionInfos.Count; index++) { EMRDBLib.MedicalQcMsg questionInfo = lstQCQuestionInfos[index]; if (!hashtable.ContainsKey(questionInfo.PATIENT_ID + questionInfo.VISIT_ID)) { EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo(); patDoctorInfo.PatientID = questionInfo.PATIENT_ID; patDoctorInfo.VisitID = questionInfo.VISIT_ID; hashtable.Add(questionInfo.PATIENT_ID + questionInfo.VISIT_ID, patDoctorInfo); lstPatDoctorInfos.Add(patDoctorInfo); } } //获取三级医生信息 shRet = PatVisitAccess.Instance.GetPatSanjiDoctors(ref lstPatDoctorInfos); //按检查者、患者姓名、检查时间排序 lstQCQuestionInfos = lstQCQuestionInfos.OrderBy(m => m.ISSUED_BY).ThenBy(m => m.PATIENT_NAME) .ThenBy(m => m.ISSUED_DATE_TIME).ToList(); //检查者检查的例数 int iCount = 0; Hashtable htPidVid = new Hashtable(); for (int index = 0; index < lstQCQuestionInfos.Count; index++) { iCount++; if (!htPidVid.ContainsKey(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID)) { htPidVid.Add(lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID, lstQCQuestionInfos[index].PATIENT_ID + lstQCQuestionInfos[index].VISIT_ID); } EMRDBLib.MedicalQcMsg questionInfo = lstQCQuestionInfos[index]; int nRowIndex = this.dataGridView1.Rows.Add(); DataGridViewRow row = this.dataGridView1.Rows[nRowIndex]; EMRDBLib.PatDoctorInfo patDoctorInfo = lstPatDoctorInfos.Find(delegate(EMRDBLib.PatDoctorInfo p) { if (p.PatientID == lstQCQuestionInfos[index].PATIENT_ID && p.VisitID == lstQCQuestionInfos[index].VISIT_ID) { return(true); } else { return(false); } }); this.SetRowData(row, questionInfo, patDoctorInfo); if ((index + 1) == lstQCQuestionInfos.Count || (lstQCQuestionInfos[index].ISSUED_BY != lstQCQuestionInfos[index + 1].ISSUED_BY)) { DataGridViewRow sumrow = this.dataGridView1.Rows[this.dataGridView1.Rows.Add()]; sumrow.Cells[0].Value = "合计"; sumrow.Cells[1].Value = "检查例数:"; sumrow.Cells[2].Value = iCount; sumrow.Cells[3].Value = "病历份数:"; sumrow.Cells[4].Value = htPidVid.Count; sumrow.DefaultCellStyle.BackColor = Color.FromArgb(200, 200, 200); iCount = 0; htPidVid.Clear(); } } if (this.dataGridView1.Rows.Count > 0) { this.dataGridView1.ClearSelection(); } this.ShowStatusMessage(null); GlobalMethods.UI.SetCursor(this, Cursors.Default); }
private void button1_Click(object sender, EventArgs e) { GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); this.ShowStatusMessage("正在查询数据,请稍候..."); this.dataGridView1.Rows.Clear(); this.dgvDetailList.Rows.Clear(); string szPatientCondition = this.cboPatientCondition.Text; string szDischargeMode = this.cboDischargeMode.Text; string szPatientCount = this.numCount.Text; string szInDaysBegin = this.txtInDaysBegin.Text.Trim(); string szInDaysEnd = this.txtInDaysEnd.Text.Trim(); string szRequestDoctorID = this.GetRequestDoctorID(); string szPARENT_DOCTORID = this.GetPARENT_DOCTORID(); if (string.IsNullOrEmpty(szPatientCount)) { MessageBoxEx.ShowMessage("请输入每科室抽取的病案数量"); GlobalMethods.UI.SetCursor(this, Cursors.Default); return; } if (this.dtpBeginTime.Value == null || this.dtpEndTime.Value == null) { MessageBoxEx.ShowMessage("请选择出院时间段"); GlobalMethods.UI.SetCursor(this, Cursors.Default); return; } DateTime dtStartTime = new DateTime(this.dtpBeginTime.Value.Year, this.dtpBeginTime.Value.Month, this.dtpBeginTime.Value.Day, 0, 0, 0); DateTime dtEndTime = new DateTime(this.dtpEndTime.Value.Year, this.dtpEndTime.Value.Month, this.dtpEndTime.Value.Day, 23, 59, 59); //如果没有选择科室就全部抽取 DeptInfo selectedDeptInfo = this.GetSelectecDeptInfo(); //获取所有的就诊科室 List <DeptInfo> lstDeptInfo = new List <DeptInfo>(); short shRet = 0; if (selectedDeptInfo == null) { shRet = EMRDBAccess.Instance.GetClinicDeptList(ref lstDeptInfo); if (shRet != SystemData.ReturnValue.OK) { MessageBoxEx.Show("获取科室列表失败"); return; } } else { lstDeptInfo.Add(selectedDeptInfo); } WorkProcess.Instance.Initialize(this, lstDeptInfo.Count, "正在随机抽取患者数据..."); for (int index = 0; index <= lstDeptInfo.Count - 1; index++) { if (WorkProcess.Instance.Canceled) { GlobalMethods.UI.SetCursor(this, Cursors.Default); WorkProcess.Instance.Close(); this.ShowStatusMessage(null); return; } DeptInfo item = lstDeptInfo[index]; WorkProcess.Instance.Show(index + 1, true); string szDeptCode = item.DEPT_CODE; List <PatVisitInfo> lstPatVisitLog = null; shRet = SpecialAccess.Instance.GetPatientList(szPatientCondition, szDischargeMode, szDeptCode, dtStartTime, dtEndTime, szPatientCount, szInDaysBegin, szInDaysEnd, szRequestDoctorID, szPARENT_DOCTORID, ref lstPatVisitLog); if (shRet == SystemData.ReturnValue.RES_NO_FOUND) { continue; } if (shRet != SystemData.ReturnValue.OK) { GlobalMethods.UI.SetCursor(this, Cursors.Default); WorkProcess.Instance.Close(); this.ShowStatusMessage(null); MessageBoxEx.Show("查询数据失败!"); return; } if (lstPatVisitLog == null || lstPatVisitLog.Count <= 0) { GlobalMethods.UI.SetCursor(this, Cursors.Default); WorkProcess.Instance.Close(); this.ShowStatusMessage(null); MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information); return; } /// 获三级医生信息 List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>(); for (int patindex = 0; patindex < lstPatVisitLog.Count; patindex++) { PatVisitInfo patVisitLog = lstPatVisitLog[patindex]; int nRowIndex = this.dataGridView1.Rows.Add(); DataGridViewRow row = this.dataGridView1.Rows[nRowIndex]; this.SetRowData(row, patVisitLog); if (this.dataGridView1.Rows.Count <= 40) { this.dataGridView1.Update(); } EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo(); patDoctorInfo.PatientID = patVisitLog.PATIENT_ID; patDoctorInfo.VisitID = patVisitLog.VISIT_ID; lstPatDoctorInfos.Add(patDoctorInfo); } //绑定三级医生信息 this.UpdateInchargeDoctor(lstPatDoctorInfos); //绑定患者病情 this.BindPatientCondition(lstPatVisitLog); } WorkProcess.Instance.Close(); this.ShowStatusMessage(string.Format("共抽取出{0}位患者", this.dataGridView1.Rows.Count.ToString())); GlobalMethods.UI.SetCursor(this, Cursors.Default); }
/// <summary> /// 初始化当前次病案抽检分配详情信息 /// </summary> private void InitCurQCSpecialDeTail() { this.dataGridView1.Rows.Clear(); this.dgvDetailList.Rows.Clear(); if (this.m_QcSpecialCheck == null || string.IsNullOrEmpty(this.m_QcSpecialCheck.ConfigID)) { return; } string szConfigID = this.m_QcSpecialCheck.ConfigID; List <QcSpecialDetail> lstQcSpecialDetail = null; short shRet = SpecialAccess.Instance.GetQCSpecialDetailList(szConfigID, ref lstQcSpecialDetail); if (shRet != SystemData.ReturnValue.OK) { return; } string szPreSpecialID = string.Empty; int detailIndex = 0; GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor); /// 获三级医生信息 List <EMRDBLib.PatDoctorInfo> lstPatDoctorInfos = new List <EMRDBLib.PatDoctorInfo>(); foreach (QcSpecialDetail item in lstQcSpecialDetail) { if (szPreSpecialID != item.SpecialID) { Specialist specialist = new Specialist(); specialist.UserID = item.SpecialID; specialist.UserName = item.SpecialName; szPreSpecialID = item.SpecialID; detailIndex = this.dgvDetailList.Rows.Add(); this.dgvDetailList.Rows[detailIndex].Cells[this.colUserName.Index].Value = item.SpecialName; this.dgvDetailList.Rows[detailIndex].Tag = specialist; List <PatVisitInfo> lstPatVisitLog = new List <PatVisitInfo>(); this.dgvDetailList.Rows[detailIndex].Cells[this.colPatientCount.Index].Tag = lstPatVisitLog; this.dgvDetailList.Rows[detailIndex].Cells[this.colPatientCount.Index].Value = lstPatVisitLog.Count.ToString(); } PatVisitInfo patVisitLog = null; shRet = SpecialAccess.Instance.GetPatVisitInfo(item.PatientID, item.VisitID, ref patVisitLog); if (patVisitLog == null) { continue; } //三级医生信息 EMRDBLib.PatDoctorInfo patDoctorInfo = new EMRDBLib.PatDoctorInfo(); patDoctorInfo.PatientID = patVisitLog.PATIENT_ID; patDoctorInfo.VisitID = patVisitLog.VISIT_ID; lstPatDoctorInfos.Add(patDoctorInfo); if (shRet != SystemData.ReturnValue.OK) { continue; } int rowIndex = this.dataGridView1.Rows.Add(); DataGridViewRow row = this.dataGridView1.Rows[rowIndex]; this.SetRowData(row, patVisitLog); Specialist detailSpecial = this.dgvDetailList.Rows[detailIndex].Tag as Specialist; row.Cells[this.colSpecialistName.Index].Tag = detailSpecial; row.Cells[this.colSpecialistName.Index].Value = item.SpecialName; if (this.dataGridView1.Rows.Count <= 20) { this.dataGridView1.Update(); } List <PatVisitInfo> lstPatVisitLogDetail = this.dgvDetailList.Rows[detailIndex].Cells[this.colPatientCount.Index].Tag as List <PatVisitInfo>; if (lstPatVisitLogDetail == null) { lstPatVisitLogDetail = new List <PatVisitInfo>(); } lstPatVisitLogDetail.Add(patVisitLog); this.dgvDetailList.Rows[detailIndex].Cells[this.colPatientCount.Index].Value = lstPatVisitLogDetail.Count.ToString(); } this.UpdateInchargeDoctor(lstPatDoctorInfos); GlobalMethods.UI.SetCursor(this, Cursors.Default); }