private void m_mthGetCurrentPatient() { clsEmrPatient_VO objPatient = null; if (MDIParent.m_objCurrentPatient != null) { objPatient = new clsEmrPatient_VO(); objPatient.m_strHISInPatientID = MDIParent.m_objCurrentPatient.m_strHISInPatientID; objPatient.m_strEMRInPatientID = MDIParent.m_objCurrentPatient.m_strEMRInPatientID; objPatient.m_strINPATIENTID_CHR = MDIParent.m_objCurrentPatient.m_strINPATIENTID_CHR; objPatient.m_strLASTNAME_VCHR = MDIParent.m_objCurrentPatient.m_strLASTNAME_VCHR; objPatient.m_strSEX_CHR = MDIParent.m_objCurrentPatient.m_strSEX_CHR; objPatient.m_strPATIENTID_CHR = MDIParent.m_objCurrentPatient.m_strPATIENTID_CHR; objPatient.m_strBIRTH_DAT = MDIParent.m_objCurrentPatient.m_strBIRTH_DAT; objPatient.m_strMARRIED_CHR = "未知"; } SetPatientInfo = objPatient; }
/// <summary> /// 将数据转化为病人列表 /// </summary> /// <param name="dtbResult"></param> /// <returns></returns> private clsEmrPatient_VO[] m_objPatientList(DataTable dtbResult) { if (dtbResult != null && dtbResult.Rows.Count > 0) { clsEmrPatient_VO[] objResultArr = new clsEmrPatient_VO[dtbResult.Rows.Count]; int intAge = 0;//计算年龄的临时变量 for (int i1 = 0; i1 < dtbResult.Rows.Count; i1++) { if (dtbResult.Rows[i1]["registerid_chr"] == DBNull.Value) { continue; } //病人基本信息 objResultArr[i1] = new clsEmrPatient_VO(); objResultArr[i1].m_strINPATIENTID_CHR = dtbResult.Rows[i1]["emrinpatientid"].ToString(); objResultArr[i1].m_strLASTNAME_VCHR = dtbResult.Rows[i1]["LASTNAME_VCHR"].ToString(); objResultArr[i1].m_strSEX_CHR = dtbResult.Rows[i1]["SEX_CHR"].ToString(); objResultArr[i1].m_strBIRTH_DAT = dtbResult.Rows[i1]["BIRTH_DAT"].ToString(); objResultArr[i1].m_strHISInPatientID = dtbResult.Rows[i1]["hisinpatientid_chr"].ToString(); objResultArr[i1].m_strEMRInPatientID = dtbResult.Rows[i1]["emrinpatientid"].ToString(); objResultArr[i1].m_strPATIENTID_CHR = dtbResult.Rows[i1]["patientid_chr"].ToString(); #region 年龄处理 if (objResultArr[i1].m_strBIRTH_DAT.Trim().Length != 0) { objResultArr[i1].m_strAGELONG_CHR = com.digitalwave.Emr.StaticObject.clsConsts.s_strCalAge(objResultArr[i1].m_strBIRTH_DAT, Convert.ToDateTime(dtbResult.Rows[i1]["hisinpatientdate"]), out intAge); } else { objResultArr[i1].m_strAGELONG_CHR = "未知"; } #endregion } return(objResultArr); } else { return(null); } }