/// <summary> /// 传入申请单单号 /// </summary> public ConsultationLogicClass(string consultationApplySn, IYidanEmrHost app) { m_app = app; m_ConsultationEntity = GetConsultationEntity(consultationApplySn); }
/// <summary> /// 根据申请单号获取GetConsultationEntity实体信息 /// </summary> /// <param name="consultationApplySn"></param> /// <returns></returns> public ConsultationEntity GetConsultationEntity(string consultationApplySn) { if (consultationApplySn == "") { return(null); } else { DataTable dt = DataAccess.GetConsultationTable(consultationApplySn); DataTable dtinp = Dal.DataAccess.GetRedactPatientInfoFrm("14", m_app.CurrentPatientInfo.NoOfFirstPage.ToString()); foreach (DataRow dr in dt.Rows) { m_ConsultationEntity = new ConsultationEntity(); m_ConsultationEntity.ConsultApplySn = consultationApplySn; if (dtinp.Rows.Count > 0) { m_ConsultationEntity.Name = dtinp.Rows[0]["NAME"].ToString().Trim(); m_ConsultationEntity.PatNoOfHIS = dtinp.Rows[0]["PatID"].ToString().Trim(); m_ConsultationEntity.SexName = dtinp.Rows[0]["Gender"].ToString().Trim(); m_ConsultationEntity.Age = dtinp.Rows[0]["AgeStr"].ToString().Trim(); m_ConsultationEntity.Bed = dtinp.Rows[0]["OutBed"].ToString().Trim(); m_ConsultationEntity.DeptName = dtinp.Rows[0]["OutHosDeptName"].ToString().Trim(); m_ConsultationEntity.WardName = dtinp.Rows[0]["outhoswardname"].ToString().Trim(); m_ConsultationEntity.DeptID = dtinp.Rows[0]["OutHosDept"].ToString().Trim(); m_ConsultationEntity.WardID = dtinp.Rows[0]["outhosward"].ToString().Trim(); } m_ConsultationEntity.UrgencyTypeID = dr["urgencytypeid"].ToString(); m_ConsultationEntity.UrgencyTypeName = dr["urgencytypeName"].ToString(); m_ConsultationEntity.ConsultTypeID = dr["consulttypeid"].ToString(); m_ConsultationEntity.ConsultTypeName = dr["consulttypeName"].ToString(); m_ConsultationEntity.Abstract = dr["abstract"].ToString(); m_ConsultationEntity.Purpose = dr["purpose"].ToString(); m_ConsultationEntity.ApplyDeptID = dr["ApplyDeptID"].ToString(); m_ConsultationEntity.ApplyDeptName = dr["ApplyDeptName"].ToString(); m_ConsultationEntity.ApplyUserID = dr["applyuserID"].ToString(); m_ConsultationEntity.ApplyUserName = dr["applyuserName"].ToString(); m_ConsultationEntity.ApplyTime = dr["applytime"].ToString(); m_ConsultationEntity.ConsultSuggestion = dr["consultsuggestion"].ToString(); m_ConsultationEntity.ConsultDeptID = dr["ConsultDeptID"].ToString(); m_ConsultationEntity.ConsultDeptName = dr["ConsultDeptName"].ToString(); m_ConsultationEntity.ConsultHospitalID = dr["hospitalcode"].ToString(); m_ConsultationEntity.ConsultHospitalName = dr["ConsultHospitalName"].ToString(); m_ConsultationEntity.ConsultDeptID2 = dr["ConsultDeptID2"].ToString(); m_ConsultationEntity.ConsultDeptName2 = dr["ConsultDeptName2"].ToString(); m_ConsultationEntity.ConsultUserID = dr["ConsultUserID"].ToString(); m_ConsultationEntity.ConsultUserName = dr["ConsultUserName"].ToString(); m_ConsultationEntity.ConsultTime = dr["ConsultTime"].ToString(); m_ConsultationEntity.StateID = dr["StateID"].ToString(); break; } return(m_ConsultationEntity); } }
private void GetConsultationEntity() { if (m_ConsultationID == "") return; else { DataTable dt = DataAccess.GetConsultationTable(m_ConsultationID); DataTable dtinp = Dal.DataAccess.GetRedactPatientInfoFrm("14", CurrentInpatient.NoOfFirstPage.ToString()); foreach (DataRow dr in dt.Rows) { m_ConsultationEntity = new ConsultationEntity(); m_ConsultationEntity.ConsultApplySn = m_ConsultationID; m_ConsultationEntity.NoOfInpat = CurrentInpatient.NoOfFirstPage.ToString(); if (dtinp.Rows.Count > 0) { m_ConsultationEntity.Name = dtinp.Rows[0]["NAME"].ToString().Trim(); m_ConsultationEntity.PatNoOfHIS = dtinp.Rows[0]["PatID"].ToString().Trim(); m_ConsultationEntity.SexName = dtinp.Rows[0]["Gender"].ToString().Trim(); m_ConsultationEntity.Age = dtinp.Rows[0]["AgeStr"].ToString().Trim(); m_ConsultationEntity.Bed = dtinp.Rows[0]["OutBed"].ToString().Trim(); m_ConsultationEntity.DeptName = dtinp.Rows[0]["OutHosDeptName"].ToString().Trim(); m_ConsultationEntity.WardName = dtinp.Rows[0]["outhoswardname"].ToString().Trim(); m_ConsultationEntity.DeptID = dtinp.Rows[0]["OutHosDept"].ToString().Trim(); m_ConsultationEntity.WardID = dtinp.Rows[0]["outhosward"].ToString().Trim(); //textEditMarriage.Text = dtinp.Rows[0]["Marriage"].ToString().Trim(); //textEditJob.Text = dtinp.Rows[0]["JobName"].ToString().Trim(); } m_ConsultTypeID = dr["consulttypeid"].ToString(); m_ConsultationEntity.UrgencyTypeID = dr["urgencytypeid"].ToString(); m_ConsultationEntity.UrgencyTypeName = dr["urgencytypeName"].ToString(); m_ConsultationEntity.ConsultTypeID = dr["consulttypeid"].ToString(); m_ConsultationEntity.ConsultTypeName = dr["consulttypeName"].ToString(); m_ConsultationEntity.Abstract = dr["abstract"].ToString(); m_ConsultationEntity.Purpose = dr["purpose"].ToString(); m_ConsultationEntity.ApplyDeptID = dr["ApplyDeptID"].ToString(); m_ConsultationEntity.ApplyDeptName = dr["ApplyDeptName"].ToString(); m_ConsultationEntity.ApplyUserID = dr["applyuserID"].ToString(); m_ConsultationEntity.ApplyUserName = dr["applyuserName"].ToString(); m_ConsultationEntity.ApplyTime = dr["applytime"].ToString(); m_ConsultationEntity.ConsultSuggestion = dr["consultsuggestion"].ToString(); m_ConsultationEntity.ConsultDeptID = dr["ConsultDeptID"].ToString(); m_ConsultationEntity.ConsultDeptName = dr["ConsultDeptName"].ToString(); m_ConsultationEntity.ConsultHospitalID = dr["hospitalcode"].ToString(); m_ConsultationEntity.ConsultHospitalName = dr["ConsultHospitalName"].ToString(); m_ConsultationEntity.ConsultDeptID2 = dr["ConsultDeptID2"].ToString(); m_ConsultationEntity.ConsultDeptName2 = dr["ConsultDeptName2"].ToString(); m_ConsultationEntity.ConsultUserID = dr["ConsultUserID"].ToString(); m_ConsultationEntity.ConsultUserName = dr["ConsultUserName"].ToString(); m_ConsultationEntity.ConsultTime = dr["ConsultTime"].ToString(); m_ConsultationEntity.StateID = dr["StateID"].ToString(); return; } } }