// 获取添加到DataTable的数据 protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { //根据不同的表单类型,获取对应的clsDiseaseTrackInfo clsDiseaseTrackInfo objTrackInfo = null; #region switch ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag) { case enmDiseaseTrackType.FirstIllnessNote: if (com.digitalwave.Emr.StaticObject.clsEMR_StaticObject.s_StrCurrentHospitalNO == "450101001") //佛二 { objTrackInfo = new clsFirstIllnessNoteInfo(); } else { objTrackInfo = new clsFirstIllnessNoteInfo_F2(); p_objTransDataInfo.m_intFlag = (int)enmDiseaseTrackType.FirstIllnessNote_F2; } break; case enmDiseaseTrackType.GeneralDisease: objTrackInfo = new clsGeneralDiseaseInfo(); break; case enmDiseaseTrackType.HandOver: objTrackInfo = new clsHandOverInfo(m_objCurrentPatient); break; case enmDiseaseTrackType.HandOver_XJ: objTrackInfo = new clsHandOverInfo_XJ(m_objCurrentPatient); break; case enmDiseaseTrackType.TakeOver: objTrackInfo = new clsTakeOverInfo(m_objCurrentPatient); break; case enmDiseaseTrackType.TakeOver_XJ: objTrackInfo = new clsTakeOverInfo_XJ(m_objCurrentPatient); break; case enmDiseaseTrackType.Consultation: objTrackInfo = new clsConsultationInfo(); break; case enmDiseaseTrackType.Convey: objTrackInfo = new clsConveyInfo(m_objCurrentPatient); break; case enmDiseaseTrackType.Convey_XJ: objTrackInfo = new clsConveyInfo_XJ(m_objCurrentPatient); break; case enmDiseaseTrackType.TurnIn: objTrackInfo = new clsTurnInInfo(m_objCurrentPatient); break; case enmDiseaseTrackType.TurnIn_XJ: objTrackInfo = new clsTurnInInfo_XJ(m_objCurrentPatient); break; case enmDiseaseTrackType.DiseaseSummary: objTrackInfo = new clsDiseaseSummaryInfo(); break; case enmDiseaseTrackType.DiseaseSummary_XJ: objTrackInfo = new clsDiseaseSummaryInfo_XJ(m_objCurrentPatient); break; case enmDiseaseTrackType.CheckRoom: objTrackInfo = new clsCheckRoomInfo(); break; case enmDiseaseTrackType.CaseDiscuss: objTrackInfo = new clsCaseDiscussInfo(); break; case enmDiseaseTrackType.BeforeOperationDiscuss: objTrackInfo = new clsBeforeOperationDiscussInfo(); break; case enmDiseaseTrackType.DeadCaseDiscuss: objTrackInfo = new clsDeadCaseDiscussInfo(); break; case enmDiseaseTrackType.DeathCaseDiscuss: objTrackInfo = new clsDeathCaseDiscussInfo(); break; case enmDiseaseTrackType.AfterOperation: objTrackInfo = new clsAfterOperationInfo(); break; case enmDiseaseTrackType.Dead: objTrackInfo = new clsDeadRecordInfo(m_objCurrentPatient); break; case enmDiseaseTrackType.Death: objTrackInfo = new clsDeathRecordInfo(); break; case enmDiseaseTrackType.OutHospital: objTrackInfo = new clsOutHospitalInfo(); break; case enmDiseaseTrackType.Save: objTrackInfo = new clsSaveRecordInfo(); break; case enmDiseaseTrackType.FirstIllnessNote_ZY: objTrackInfo = new clsFirstIllnessNote_ZYInfo(); break; case enmDiseaseTrackType.EMR_SummaryBeforeOP: objTrackInfo = new clsEMR_SummaryBeforeOPInfo(); break; case enmDiseaseTrackType.FirstIllnessNote_F2: objTrackInfo = new clsFirstIllnessNoteInfo_F2(); break; case enmDiseaseTrackType.FirstIllnessNote_XJ: objTrackInfo = new clsFirstIllnessNoteInfo_XJ(); break; } #endregion //设置clsDiseaseTrackInfo的内容 objTrackInfo.m_ObjRecordContent = p_objTransDataInfo.m_objRecordContent; int intCharPerLine = clmContent.Width / 14 - 4; int intBytesPerLine = 100; //根据 clsDiseaseTrackInfo 获得的文本和Xml string strText = ""; string strXML = ""; if ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag == enmDiseaseTrackType.CaseDiscuss) { ((clsCaseDiscussInfo)objTrackInfo).m_mthGetFormatTrackInfo(((int)(clmContent.Width / 17.5)) - 5, out strText, out strXML); } else if ((enmDiseaseTrackType)p_objTransDataInfo.m_intFlag == enmDiseaseTrackType.DeadCaseDiscuss) { ((clsDeadCaseDiscussInfo)objTrackInfo).m_mthGetFormatTrackInfo(((int)(clmContent.Width / 17.5)) - 5, out strText, out strXML); } else { strText = objTrackInfo.m_strGetTrackText(); strXML = objTrackInfo.m_strGetTrackXml(); } string strSignText = objTrackInfo.m_strGetSignText(); string strSignXml = objTrackInfo.m_strGetSignXml(); string strBlanks = ""; for (int j2 = 0; j2 < intCharPerLine - strSignText.Length; j2++) { strBlanks += " "; //注意:此处填充的空格是全角占一个汉字的空格 } strSignText = strBlanks + strSignText; //结合DataGrid每行的显示数目 //生成每行内容的文本和Xml数组 string[] strTextArr, strXmlArr; com.digitalwave.controls.ctlRichTextBox.m_mthSplitXmlByBytes(strText, strXML, intBytesPerLine, out strTextArr, out strXmlArr); object[][] objData = new object[strTextArr.Length + 1][]; for (int i = 0; i < objData.Length - 1; i++) { objData[i] = new object[7]; //设置值 if (i == 0) { //只在第一行记录才由以下信息 objData[i][0] = objTrackInfo.m_ObjRecordContent.m_dtmCreateDate.ToString(MDIParent.s_ObjRecordDateTimeInfo.m_strGetRecordTimeFormat(this.Name)); //存放记录时间的字符串 objData[i][1] = (int)objTrackInfo.m_enmGetTrackType(); //存放记录类型的int值 objData[i][2] = objTrackInfo.m_ObjRecordContent.m_dtmOpenDate.ToString("yyyy-MM-dd HH:mm:ss"); //存放记录的OpenDate字符串 objData[i][3] = objTrackInfo.m_ObjRecordContent.m_dtmModifyDate.ToString("yyyy-MM-dd HH:mm:ss"); //存放记录的ModifyDate字符串 objData[i][5] = objTrackInfo.m_ObjRecordContent.m_StrPagination; //存放分页 objData[i][6] = objTrackInfo.m_ObjRecordContent.m_strCreateUserID; //存放记录的createuserid字符串 } clsDSTRichTextBoxValue objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strTextArr[i]; objclsDSTRichTextBoxValue.m_strDSTXml = strXmlArr[i]; objData[i][4] = objclsDSTRichTextBoxValue;//存放显示内容 } objData[objData.Length - 1] = new object[5]; // objData[objData.Length - 1] = new object[6]; clsDSTRichTextBoxValue objclsDSTRichTextBoxValueSign = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValueSign.m_strText = strSignText; objclsDSTRichTextBoxValueSign.m_strDSTXml = strSignXml; objData[objData.Length - 1][4] = objclsDSTRichTextBoxValueSign;//存放显示内容 // objData[objData.Length - 1][5] = objclsDSTRichTextBoxValueSign;//存放显示内容 return(objData); }
/// <summary> /// 设置过滤后的打印内容。 /// </summary> private void m_mthSetPrintValue() { if (m_objPrintMainInfo.m_objRecordArr == null && m_objPrintMainInfo.m_objRecordArr.Length <= 0) { return; } //if (m_objReturnData == null) m_objReturnData = new ArrayList(); int intRecordCount = m_objPrintMainInfo.m_objRecordArr.Length; string strText, strXml; object[] objData = null; DateTime m_dtmPreRecordDate = DateTime.MinValue; clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; try { for (int i = m_intPrintedCounts; i < intRecordCount; i++) { clsEMR_OXTIntravenousDripCon objCurrent = m_objPrintMainInfo.m_objRecordArr[i]; clsEMR_OXTIntravenousDripCon objNext = new clsEMR_OXTIntravenousDripCon();//下一条记录 if (i < intRecordCount - 1) { objNext = m_objPrintMainInfo.m_objRecordArr[i + 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim()) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < m_intCanModifyTiem) { continue; } } #region 存放关键字段 objData = new object[11]; if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { //同一个则只在第一行显示日期 if (objCurrent.m_dtmRecordDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) { objData[0] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd");//日期字符串 } else { objData[0] = ""; } //修改后带有痕迹的记录不再显示时间 if (m_dtmPreRecordDate != objCurrent.m_dtmRecordDate) { objData[1] = objCurrent.m_dtmRecordDate.ToString("HH:mm");//时间字符串 } else { objData[1] = ""; } } m_dtmPreRecordDate = objCurrent.m_dtmRecordDate; #endregion ; #region 存放单项信息 //催产素浓度 strText = objCurrent.m_strOXTDENSITY_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strOXTDENSITY_RIGHT != objCurrent.m_strOXTDENSITY_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(strText, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[2] = objclsDSTRichTextBoxValue; //滴数 strText = objCurrent.m_strOXTDROPCOUNT_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strOXTDROPCOUNT_RIGHT != objCurrent.m_strOXTDROPCOUNT_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strOXTDROPCOUNT_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[3] = objclsDSTRichTextBoxValue; //宫缩 strText = objCurrent.m_strUTERINECONTRACTION_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strUTERINECONTRACTION_RIGHT != objCurrent.m_strUTERINECONTRACTION_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strUTERINECONTRACTION_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[4] = objclsDSTRichTextBoxValue; //胎心 strText = objCurrent.m_strFETALHEART_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strFETALHEART_RIGHT != objCurrent.m_strFETALHEART_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strFETALHEART_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[5] = objclsDSTRichTextBoxValue; //宫口扩张 strText = objCurrent.m_strMETREURYNT_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strMETREURYNT_RIGHT != objCurrent.m_strMETREURYNT_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strMETREURYNT_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //先露高低 strText = objCurrent.m_strPRESENTATION_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPRESENTATION_RIGHT != objCurrent.m_strPRESENTATION_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strPRESENTATION_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //血压 strText = objCurrent.m_strBP_S_RIGHT + "/" + objCurrent.m_strBP_A_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && (objNext.m_strBP_S_RIGHT + "/" + objNext.m_strBP_A_RIGHT) != (objCurrent.m_strBP_S_RIGHT + "/" + objCurrent.m_strBP_A_RIGHT)) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(strText, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //特殊情况及处理 strText = objCurrent.m_strSPECIALINFO_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strSPECIALINFO_RIGHT != objCurrent.m_strSPECIALINFO_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strSPECIALINFO_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; if (objCurrent.objSignerArr != null) { //签名 strText = string.Empty; for (int j = 0; j < objCurrent.objSignerArr.Length; j++) { strText += objCurrent.objSignerArr[j].objEmployee.m_strLASTNAME_VCHR + " "; } strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; } #endregion m_objReturnData.Add(objData); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { // #region 处理产次 // m_txtDiseaseID.Text = ""; // //m_dtpCreateDate.Value = System.DateTime.Now; // #endregion if (p_objTransDataInfo == null) { return(null); } object[] objData; ArrayList objReturnData = new ArrayList(); clsICUACAD_POSTPARTUMSEERECORDContentDataInfo objICUInfo = new clsICUACAD_POSTPARTUMSEERECORDContentDataInfo(); //(需要改动) clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; objICUInfo = (clsICUACAD_POSTPARTUMSEERECORDContentDataInfo)p_objTransDataInfo; //(需要改动) if (objICUInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objICUInfo.m_objRecordArr.Length; int intRowOfCurrentDetail = 0; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion for (int i = 0; i < intRecordCount; i++) { objData = new object[17]; //(需要改动) DataTable的列数 clsIcuACAD_PostPartumseeRecord_VO objCurrent = objICUInfo.m_objRecordArr[i]; //(需要改动) clsIcuACAD_PostPartumseeRecord_VO objNext = new clsIcuACAD_PostPartumseeRecord_VO(); //下一条记录//(需要改动) if (i < intRecordCount - 1) { objNext = objICUInfo.m_objRecordArr[i + 1]; } ////如果该护理记录是修改前的记录且是在指定时间内修改的,则不显示 //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate) //{ // TimeSpan tsModify = objNext.m_dtmModifyDate-objCurrent.m_dtmModifyDate; // if((int)tsModify.TotalHours < intCanModifyTime) // continue; //} //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim() && objNext.m_dtmOpenDate == objCurrent.m_dtmOpenDate) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { // blnPreIsHide = true; continue; } } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmCreateDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.PostartumSeeRecord; //存放记录类型的int值 //(需要改动) objData[2] = objCurrent.m_dtmCreateDate; //存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate; //存放记录的ModifyDate字符串,不考虑痕迹时 //objData[3] = objICUInfo.m_objRecordArr[objICUInfo.m_objRecordArr.Length-1].m_dtmModifyDate;//存放记录的ModifyDate字符串 //同一个则只在第一行显示日期 if (objCurrent.m_dtmCreateDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) //m_dtmRECORDDATE { objData[4] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd");; //日期字符串 } //修改后带有痕迹的记录不再显示时间 if (m_dtmPreRecordDate != objCurrent.m_dtmCreateDate) { objData[5] = objCurrent.m_dtmRecordDate.ToString("HH:mm");//时间字符串 } } m_dtmPreRecordDate = objCurrent.m_dtmCreateDate; #endregion ; // //产次处理 // m_txtDiseaseID.Text = objCurrent.m_strLayCount_chr; // if(objCurrent.m_strBeforehand_chr.Trim() != "") // m_dtpCreateDate.Value = Convert.ToDateTime(objCurrent.m_strBeforehand_chr.ToString().Trim()); // // #region 存放单项信息 //血压 strText = objCurrent.m_strBLOODPRESSURE_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBLOODPRESSURE_CHR_RIGHT != objCurrent.m_strBLOODPRESSURE_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBLOODPRESSURE_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //血压 //体温 strText = objCurrent.m_strBODYTEMPARTURE_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBODYTEMPARTURE_CHR_RIGHT != objCurrent.m_strBODYTEMPARTURE_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strBODYTEMPARTURE_CHR_RIGHT ,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //体温 //脉搏 strText = objCurrent.m_strPULSE_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPULSE_CHR_RIGHT != objCurrent.m_strPULSE_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strPULSE_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //脉搏 //宫缩 strText = objCurrent.m_strUTERUS_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strUTERUS_CHR_RIGHT != objCurrent.m_strUTERUS_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strUTERUS_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //宫缩 //出血 strText = objCurrent.m_strBLOODED_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBLOODED_CHR_RIGHT != objCurrent.m_strBLOODED_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strBLOODED_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; //出血 //破水 strText = objCurrent.m_strBREAKWATER_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBREAKWATER_CHR_RIGHT != objCurrent.m_strBREAKWATER_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strBREAKWATER_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[11] = objclsDSTRichTextBoxValue; //破水 //胎心 strText = objCurrent.m_strEMBRYO_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strEMBRYO_CHR_RIGHT != objCurrent.m_strEMBRYO_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strEMBRYO_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[12] = objclsDSTRichTextBoxValue; //胎心 //宫口大小 strText = objCurrent.m_strUTERUSSIZE_CHR_RIGHT; strXml = "<root />"; //if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strUTERUSSIZE_CHR_RIGHT != objCurrent.m_strUTERUSSIZE_CHR_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ //{ // strXml = m_strGetDSTTextXML(objCurrent.m_strUTERUSSIZE_CHR_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); //} objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[13] = objclsDSTRichTextBoxValue; //宫口大小 //签名 if (objCurrent.objSignerArr != null || objCurrent.objSignerArr.Length > 0) { string str = string.Empty; if (objCurrent.objSignerArr[0].objEmployee != null) { str = objCurrent.objSignerArr[0].objEmployee.m_strGetTechnicalRankAndName; } for (int w1 = 1; w1 < objCurrent.objSignerArr.Length; w1++) { if (objCurrent.objSignerArr[w1].objEmployee != null) { str += ";" + objCurrent.objSignerArr[w1].objEmployee.m_strGetTechnicalRankAndName; } } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = str; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[14] = objclsDSTRichTextBoxValue;//签名 } // objData[15] = objCurrent.m_strRecordUserID; // objData[16] = objCurrent.m_strCreateUserID; // objReturnData.Add(objData); #endregion } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
/// <summary> /// 获取显示到DataGrid的数据 /// </summary> /// <param name="p_objTransDataInfo"></param> /// <returns></returns> protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { object[] objData; ArrayList objReturnData = new ArrayList(); clsEMR_OXTIntravenousDripDataInfo objInfo = p_objTransDataInfo as clsEMR_OXTIntravenousDripDataInfo; if (objInfo != null && objInfo.m_objBaseInfo != null) { m_objCurrentBaseVO = objInfo.m_objBaseInfo; } if (objInfo == null || objInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objInfo.m_objRecordArr.Length; clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion for (int i = 0; i < intRecordCount; i++) { objData = new object[16]; clsEMR_OXTIntravenousDripCon objCurrent = objInfo.m_objRecordArr[i]; clsEMR_OXTIntravenousDripCon objNext = new clsEMR_OXTIntravenousDripCon();//下一条记录 if (i < intRecordCount - 1) { objNext = objInfo.m_objRecordArr[i + 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim()) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { continue; } } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmRecordDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.EMR_OXTIntravenousDrip; //存放记录类型的int值 objData[2] = objCurrent.m_dtmCreateDate;//存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate;//存放记录的ModifyDate字符串 //同一个则只在第一行显示日期 if (objCurrent.m_dtmRecordDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) { objData[4] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd");//日期字符串 } //修改后带有痕迹的记录不再显示时间 if (m_dtmPreRecordDate != objCurrent.m_dtmRecordDate) { objData[5] = objCurrent.m_dtmRecordDate.ToString("HH:mm"); //时间字符串 } objData[15] = objCurrent.m_strCreateUserID; //存放记录的createUserid字符串 } m_dtmPreRecordDate = objCurrent.m_dtmRecordDate; #endregion ; #region 存放单项信息 //催产素浓度 strText = objCurrent.m_strOXTDENSITY_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strOXTDENSITY_RIGHT != objCurrent.m_strOXTDENSITY_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(strText, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //滴数 strText = objCurrent.m_strOXTDROPCOUNT_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strOXTDROPCOUNT_RIGHT != objCurrent.m_strOXTDROPCOUNT_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strOXTDROPCOUNT_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //宫缩 strText = objCurrent.m_strUTERINECONTRACTION_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strUTERINECONTRACTION_RIGHT != objCurrent.m_strUTERINECONTRACTION_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strUTERINECONTRACTION_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //胎心 strText = objCurrent.m_strFETALHEART_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strFETALHEART_RIGHT != objCurrent.m_strFETALHEART_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strFETALHEART_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //宫口扩张 strText = objCurrent.m_strMETREURYNT_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strMETREURYNT_RIGHT != objCurrent.m_strMETREURYNT_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strMETREURYNT_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; //先露高低 strText = objCurrent.m_strPRESENTATION_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPRESENTATION_RIGHT != objCurrent.m_strPRESENTATION_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strPRESENTATION_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[11] = objclsDSTRichTextBoxValue; //血压 strText = objCurrent.m_strBP_S_RIGHT + "/" + objCurrent.m_strBP_A_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && (objNext.m_strBP_S_RIGHT + "/" + objNext.m_strBP_A_RIGHT) != (objCurrent.m_strBP_S_RIGHT + "/" + objCurrent.m_strBP_A_RIGHT)) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(strText, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[12] = objclsDSTRichTextBoxValue; //特殊情况及处理 strText = objCurrent.m_strSPECIALINFO_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strSPECIALINFO_RIGHT != objCurrent.m_strSPECIALINFO_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strSPECIALINFO_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[13] = objclsDSTRichTextBoxValue; if (objCurrent.objSignerArr != null) { //签名 strText = string.Empty; for (int j = 0; j < objCurrent.objSignerArr.Length; j++) { strText += objCurrent.objSignerArr[j].objEmployee.m_strLASTNAME_VCHR + " "; } strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[14] = objclsDSTRichTextBoxValue; } #endregion objReturnData.Add(objData); } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
/// <summary> /// 获取显示到DataGrid的数据 /// </summary> /// <param name="p_objTransDataInfo"></param> /// <returns></returns> protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { object[] objData; ArrayList objReturnData = new ArrayList(); clsEMR_MicroBooldSugarCheckDataInfo objInfo = null; objInfo = p_objTransDataInfo as clsEMR_MicroBooldSugarCheckDataInfo; if (objInfo == null || objInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objInfo.m_objRecordArr.Length; clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion for (int i = 0; i < intRecordCount; i++) { objData = new object[9]; clsEMR_MicroBooldSugarCheckValue objCurrent = objInfo.m_objRecordArr[i]; clsEMR_MicroBooldSugarCheckValue objNext = new clsEMR_MicroBooldSugarCheckValue();//下一条记录 if (i < intRecordCount - 1) { objNext = objInfo.m_objRecordArr[i + 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim()) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { continue; } } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmRecordDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.EMR_MicroBooldSugarCheck; //存放记录类型的int值 objData[2] = objCurrent.m_dtmCreateDate;//存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate;//存放记录的ModifyDate字符串 //同一个则只在第一行显示日期 if (objCurrent.m_dtmRecordDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) { objData[4] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd");//日期字符串 } objData[8] = objCurrent.m_strCreateUserID;//存放记录的createUserid字符串 } m_dtmPreRecordDate = objCurrent.m_dtmRecordDate; #endregion ; #region 存放单项信息 //监测时间 strText = objCurrent.m_strCHECKTIME_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strCHECKTIME_RIGHT != objCurrent.m_strCHECKTIME_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strCHECKTIME_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[5] = objclsDSTRichTextBoxValue; //监测结果 strText = objCurrent.m_strCHECKRESULT_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strCHECKRESULT_RIGHT != objCurrent.m_strCHECKRESULT_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strCHECKRESULT_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; if (objCurrent.objSignerArr != null) { //签名 strText = string.Empty; for (int j = 0; j < objCurrent.objSignerArr.Length; j++) { strText += objCurrent.objSignerArr[j].objEmployee.m_strGetTechnicalRankAndName + " "; } strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; } else //从旧表导过来的数据没有电子签名 { clsEmrEmployeeBase_VO objEMP = null; clsHospitalManagerDomain objDomain = new clsHospitalManagerDomain(); long lngRes = objDomain.m_lngGetEmpByID(objCurrent.m_strCreateUserID, out objEMP); if (objEMP != null) { strText = objEMP.m_strLASTNAME_VCHR; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; } objDomain = null; } #endregion objReturnData.Add(objData); } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { // #region 处理产次 // m_txtDiseaseID.Text = ""; // m_dtpCreateDate.Value = System.DateTime.Now; // #endregion if (p_objTransDataInfo == null) { return(null); } object[] objData; ArrayList objReturnData = new ArrayList(); clsQuickeningTutelarContentDataInfo objICUInfo = new clsQuickeningTutelarContentDataInfo(); //(需要改动) clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; objICUInfo = (clsQuickeningTutelarContentDataInfo)p_objTransDataInfo; //(需要改动) if (objICUInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objICUInfo.m_objRecordArr.Length; int intRowOfCurrentDetail = 0; for (int i = 0; i < intRecordCount; i++) { objData = new object[10]; //(需要改动) DataTable的列数 clsQuickeningTutelarValue objCurrent = objICUInfo.m_objRecordArr[i]; //(需要改动) clsQuickeningTutelarValue objNext = new clsQuickeningTutelarValue(); //下一条记录//(需要改动) if (i < intRecordCount - 1) { objNext = objICUInfo.m_objRecordArr[i + 1]; } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmCreateDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.QuickeningTutelar_Acad; //存放记录类型的int值 //(需要改动) objData[2] = objCurrent.m_dtmOpenDate; //存放记录的OpenDate字符串 objData[3] = objICUInfo.m_objRecordArr[objICUInfo.m_objRecordArr.Length - 1].m_dtmModifyDate; //存放记录的ModifyDate字符串 objData[4] = objCurrent.m_dtmCreateDate.ToString("yyyy-MM-dd"); //日期字符串 //修改后带有痕迹的记录不再显示时间 // if(i==0 || (i > 0 && objICUInfo.m_objRecordArr[i-1].m_dtmCreateDate != objCurrent.m_dtmCreateDate)) // objData[5] = objCurrent.m_dtmCreateDate.ToString("HH:mm");//时间字符串 // } m_dtmPreRecordDate = objCurrent.m_dtmCreateDate; #endregion ; // //产次处理 // m_txtDiseaseID.Text = objCurrent.m_strLayCount_chr; // if(objCurrent.m_strBeforehand_chr.Trim() != "") // m_dtpCreateDate.Value = Convert.ToDateTime(objCurrent.m_strBeforehand_chr.ToString().Trim()); // // #region 存放单项信息 // strText = objCurrent.m_strPREGNANTTEAM_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPREGNANTTEAM_CHR_RIGHT != objCurrent.m_strPREGNANTTEAM_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strPREGNANTTEAM_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[5] = objclsDSTRichTextBoxValue; //孕周 //早 strText = objCurrent.m_strMORNING_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strMORNING_CHR_RIGHT != objCurrent.m_strMORNING_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strMORNING_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //早 //中 strText = objCurrent.m_strMIDDAY_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strMIDDAY_CHR_RIGHT != objCurrent.m_strMIDDAY_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strMIDDAY_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //中 // 晚 strText = objCurrent.m_strEVENING_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strEVENING_CHR_RIGHT != objCurrent.m_strEVENING_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strEVENING_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; // 晚 //12小时胎动数 strText = objCurrent.m_strQUICKENINGNUM_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strQUICKENINGNUM_CHR_RIGHT != objCurrent.m_strQUICKENINGNUM_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strQUICKENINGNUM_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //12小时胎动数 // // 检查着 // strText = objCurrent.m_strScrutator_chr_RIGHT ; // strXml = "<root />"; // if(objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strScrutator_chr_RIGHT != objCurrent.m_strScrutator_chr_RIGHT)/*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ // { // strXml = m_strGetDSTTextXML(objCurrent.m_strScrutator_chr_RIGHT,objCurrent.m_strModifyUserID,objCurrent.m_strModifyUserName); // } // objclsDSTRichTextBoxValue=new clsDSTRichTextBoxValue(); // objclsDSTRichTextBoxValue.m_strText=strText; // objclsDSTRichTextBoxValue.m_strDSTXml=strXml; // objData[18] = objclsDSTRichTextBoxValue;// #region bak //一般情况 // string[] strGeneralInstanceArr = null; // string[] strGeneralInstanceXMLArr = null; // if(objCurrent.m_strGENERALINSTANCE_RIGHT != null ||objCurrent.m_strGENERALINSTANCE_RIGHT != "") // { // string strGeneralInstance = objCurrent.m_strGENERALINSTANCE_RIGHT; // string strGeneralInstanceXML = objCurrent.m_strGENERALINSTANCEXML; // string[] strGeneralInstanceArrTemp; // string[] strGeneralInstanceXMLArrTemp; // //将病情记录分为20个字符一行。因第一行要空两格,故添加空字符串 // com.digitalwave.controls.ctlRichTextBox.m_mthSplitXml(" "+strGeneralInstance,strGeneralInstanceXML,16,out strGeneralInstanceArrTemp,out strGeneralInstanceXMLArrTemp); // // if(objCurrent.m_strCreateUserName != null && objCurrent.m_strCreateUserName != "") // { // strGeneralInstanceArr = new string[strGeneralInstanceArrTemp.Length + 1]; // strGeneralInstanceXMLArr = new string[strGeneralInstanceXMLArrTemp.Length + 1]; // // for(int j=0; j<strGeneralInstanceArr.Length-1; j++) // { // strGeneralInstanceArr[j] = strGeneralInstanceArrTemp[j]; // } // strGeneralInstanceArr[strGeneralInstanceArr.Length-1] = objCurrent.m_dtmCreateDate.ToString("yyyy-MM-dd")+" "+objCurrent.m_strCreateUserName; // // strGeneralInstanceXMLArr[strGeneralInstanceXMLArr.Length-1] = ""; // for(int j=0; j<strGeneralInstanceXMLArr.Length-1; j++) // { // strGeneralInstanceXMLArr[j] = strGeneralInstanceXMLArrTemp[j]; // } // } // else // { // strGeneralInstanceArr = strGeneralInstanceArrTemp; // strGeneralInstanceXMLArr = strGeneralInstanceXMLArrTemp; // } // // strText = strGeneralInstanceArr[0]; // strXml = strGeneralInstanceXMLArr[0]; // objclsDSTRichTextBoxValue=new clsDSTRichTextBoxValue(); // objclsDSTRichTextBoxValue.m_strText=strText; // objclsDSTRichTextBoxValue.m_strDSTXml=strXml; // objData[16] = objclsDSTRichTextBoxValue; // } // objReturnData.Add(objData); // // if(strGeneralInstanceArr.Length > 1) // { // object[] objInstance = null; // for(int j=1; j<strGeneralInstanceArr.Length; j++) // { // objInstance = new object[17]; // strText = strGeneralInstanceArr[j]; // strXml = strGeneralInstanceXMLArr[j]; // objclsDSTRichTextBoxValue=new clsDSTRichTextBoxValue(); // objclsDSTRichTextBoxValue.m_strText=strText; // objclsDSTRichTextBoxValue.m_strDSTXml=strXml; // objInstance[16] = objclsDSTRichTextBoxValue; // objReturnData.Add(objInstance); // } // } #endregion objReturnData.Add(objData); #endregion } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
/// <summary> /// 获取显示到DataGrid的数据 /// </summary> /// <param name="p_objTransDataInfo"></param> /// <returns></returns> protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { object[] objData; ArrayList objReturnData = new ArrayList(); clsEMR_WAITLAYRECORD_GXDataInfo objInfo = null; objInfo = p_objTransDataInfo as clsEMR_WAITLAYRECORD_GXDataInfo; if (objInfo == null || objInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objInfo.m_objRecordArr.Length; clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion for (int i = 0; i < intRecordCount; i++) { objData = new object[18]; clsEMR_WAITLAYRECORD_GX objCurrent = objInfo.m_objRecordArr[i]; clsEMR_WAITLAYRECORD_GX objNext = new clsEMR_WAITLAYRECORD_GX();//下一条记录 if (i < intRecordCount - 1) { objNext = objInfo.m_objRecordArr[i + 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim()) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { continue; } } m_txtLayTimes.Text = objCurrent.m_strLAYCOUNT_CHR; if (objCurrent.m_dtmBEFOREHAND != DateTime.MinValue) { m_dtpLayDate.Text = objCurrent.m_dtmBEFOREHAND.ToString("yyyy年MM月dd日"); } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmRecordDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.EMR_WAITLAYRECORD_GX; //存放记录类型的int值 objData[2] = objCurrent.m_dtmCreateDate;//存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate;//存放记录的ModifyDate字符串 //同一个则只在第一行显示日期 if (objCurrent.m_dtmRecordDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) { objData[4] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd");//日期字符串 } //修改后带有痕迹的记录不再显示时间 if (m_dtmPreRecordDate != objCurrent.m_dtmRecordDate) { objData[5] = objCurrent.m_dtmRecordDate.ToString("HH:mm"); //时间字符串 } objData[17] = objCurrent.m_strCreateUserID; //存放记录的createUserid字符串 } m_dtmPreRecordDate = objCurrent.m_dtmRecordDate; #endregion ; #region 存放单项信息 //血压 strText = objCurrent.m_strBLOODPRESSURE_S_CHR_RIGHT + "/" + objCurrent.m_strBLOODPRESSURE_A_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && (objNext.m_strBLOODPRESSURE_S_CHR_RIGHT + "/" + objNext.m_strBLOODPRESSURE_A_CHR_RIGHT) != (objCurrent.m_strBLOODPRESSURE_S_CHR_RIGHT + "/" + objCurrent.m_strBLOODPRESSURE_A_CHR_RIGHT)) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(strText, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //胎心 strText = objCurrent.m_strEMBRYOHEART_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strEMBRYOHEART_CHR_RIGHT != objCurrent.m_strEMBRYOHEART_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strEMBRYOHEART_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //宫缩>>间歇 strText = objCurrent.m_strINTERMISSION_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strINTERMISSION_CHR_RIGHT != objCurrent.m_strINTERMISSION_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strINTERMISSION_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //宫缩>>持续 strText = objCurrent.m_strPERSIST_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPERSIST_CHR_RIGHT != objCurrent.m_strPERSIST_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strPERSIST_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //宫缩>>强度 strText = objCurrent.m_strINTENSITY_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strINTENSITY_CHR_RIGHT != objCurrent.m_strINTENSITY_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strINTENSITY_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; //宫口 strText = objCurrent.m_strPALACEMOUTH_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strPALACEMOUTH_CHR_RIGHT != objCurrent.m_strPALACEMOUTH_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strPALACEMOUTH_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[11] = objclsDSTRichTextBoxValue; //先露 strText = objCurrent.m_strSHOW_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strSHOW_CHR_RIGHT != objCurrent.m_strSHOW_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strSHOW_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[12] = objclsDSTRichTextBoxValue; //胎膜 strText = objCurrent.m_strCAUL_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strCAUL_CHR_RIGHT != objCurrent.m_strCAUL_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strCAUL_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[13] = objclsDSTRichTextBoxValue; //肛(阴)查 strText = objCurrent.m_strANUSCHECK_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strANUSCHECK_CHR_RIGHT != objCurrent.m_strANUSCHECK_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strANUSCHECK_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[14] = objclsDSTRichTextBoxValue; //附注 strText = objCurrent.m_strREMARK_CHR_RIGHT; strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strREMARK_CHR_RIGHT != objCurrent.m_strREMARK_CHR_RIGHT) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strREMARK_CHR_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[15] = objclsDSTRichTextBoxValue; strText = string.Empty; if (objCurrent.objSignerArr != null) { //签名 for (int j = 0; j < objCurrent.objSignerArr.Length; j++) { strText += objCurrent.objSignerArr[j].objEmployee.m_strGetTechnicalRankAndName + " "; } } if (objCurrent.m_strCHECKEMP_RIGHT != null) { strText += " " + objCurrent.m_strCHECKEMP_RIGHT; } strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[16] = objclsDSTRichTextBoxValue; #endregion objReturnData.Add(objData); } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { object[] objData; ArrayList objReturnData = new ArrayList(); int intCurrentDetail = 0; //当前病情记录在ArrayList中的索引 int intRecordCount = 0; bool blnPreIsHide = false; //判断上一条记录是否被隐藏 clsAYQBabyAssessmentContent_DataInfo objGNRCInfo = new clsAYQBabyAssessmentContent_DataInfo(); clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; objGNRCInfo = (clsAYQBabyAssessmentContent_DataInfo)p_objTransDataInfo; if (objGNRCInfo.m_objRecordArr == null && objGNRCInfo.m_objDetail == null) { return(null); } if (objGNRCInfo.m_objRecordArr != null) { intRecordCount = objGNRCInfo.m_objRecordArr.Length; } int intRowOfCurrentDetail = 0; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion clsAYQBabyAssessmentContent objCurrent; clsAYQBabyAssessmentContent objNext; for (int i = 0; i < intRecordCount; i++) { objData = new object[19]; objCurrent = objGNRCInfo.m_objRecordArr[i]; objNext = new clsAYQBabyAssessmentContent();//下一条护理记录 if (i < intRecordCount - 1) { objNext = objGNRCInfo.m_objRecordArr[i + 1]; } clsAYQBabyAssessmentContent objLast = null; if (i > 0) { objLast = objGNRCInfo.m_objRecordArr[i - 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim() && objNext.m_dtmOpenDate == objCurrent.m_dtmOpenDate) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { blnPreIsHide = true; continue; } } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmRECORDDATE; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.AYQBabyAssessmentRecordRec; //存放记录类型的int值 objData[2] = objCurrent.m_dtmOpenDate; //存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate; //存放记录的ModifyDate字符串 objData[4] = objCurrent.m_dtmRECORDDATE.Date.ToString("yyyy-MM-dd"); //日期字符串 objData[5] = objCurrent.m_dtmRECORDDATE.ToString("HH:mm"); //时间字符串 objData[18] = objCurrent.m_strCreateUserID; //存放记录的createUserid字符串 } #endregion ; #region 存放单项信息 bool blnIsRed = false; //面色 strText = objCurrent.m_strFacecolor; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //呼吸 strText = objCurrent.m_strRespiration; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //反应 strText = objCurrent.m_strReaction; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //进食 strText = objCurrent.m_strTakeFood; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //腋湿 strText = objCurrent.m_strArmpitWet; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; //皮肤 strText = objCurrent.m_strDerm; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[11] = objclsDSTRichTextBoxValue; //黄疸 strText = objCurrent.m_strAurigo; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[12] = objclsDSTRichTextBoxValue; //脐部 strText = objCurrent.m_strUmbilicalRegion; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[13] = objclsDSTRichTextBoxValue; //四肢活动 strText = objCurrent.m_strLimbActivity; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[14] = objclsDSTRichTextBoxValue; //大便 strText = objCurrent.m_strStool; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[15] = objclsDSTRichTextBoxValue; //小便 strText = objCurrent.m_strUrine; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[16] = objclsDSTRichTextBoxValue; //签名 strText = objCurrent.m_strRecordSign; objData[17] = strText; objReturnData.Add(objData); #endregion } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
/// <summary> /// 获取显示到DataGrid的数据 /// </summary> /// <param name="p_objTransDataInfo"></param> /// <returns></returns> protected override object[][] m_objGetRecordsValueArr(clsTransDataInfo p_objTransDataInfo) { #region 显示记录到DataGrid try { object[] objData; ArrayList objReturnData = new ArrayList(); clsEMR_GestationDiabetesCureDataInfo objInfo = null; objInfo = p_objTransDataInfo as clsEMR_GestationDiabetesCureDataInfo; if (objInfo == null || objInfo.m_objRecordArr == null) { return(null); } int intRecordCount = objInfo.m_objRecordArr.Length; clsDSTRichTextBoxValue objclsDSTRichTextBoxValue; string strText, strXml; #region 获取修改限定时间 int intCanModifyTime = 0; try { intCanModifyTime = int.Parse(m_strCanModifyTime); } catch { intCanModifyTime = 6; } #endregion for (int i = 0; i < intRecordCount; i++) { objData = new object[22]; clsEMR_GestationDiabetesCureValue objCurrent = objInfo.m_objRecordArr[i]; clsEMR_GestationDiabetesCureValue objNext = new clsEMR_GestationDiabetesCureValue();//下一条记录 if (i < intRecordCount - 1) { objNext = objInfo.m_objRecordArr[i + 1]; } //如果该护理记录是修改前的记录且是在指定时间内修改的,修改者与创建者为同一人,则不显示 if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strModifyUserID.Trim() == objCurrent.m_strCreateUserID.Trim()) { TimeSpan tsModify = objNext.m_dtmModifyDate - objCurrent.m_dtmModifyDate; if ((int)tsModify.TotalHours < intCanModifyTime) { continue; } } #region 存放关键字段 if (objCurrent.m_dtmCreateDate != DateTime.MinValue) { objData[0] = objCurrent.m_dtmRecordDate; //存放记录时间的字符串 objData[1] = (int)enmRecordsType.EMR_GestationDiabetesCure; //存放记录类型的int值 objData[2] = objCurrent.m_dtmCreateDate; //存放记录的OpenDate字符串 objData[3] = objCurrent.m_dtmModifyDate; //存放记录的ModifyDate字符串 //同一个则只在第一行显示日期 if (objCurrent.m_dtmRecordDate.Date.ToString() != m_dtmPreRecordDate.Date.ToString()) { objData[4] = objCurrent.m_dtmRecordDate.Date.ToString("yyyy-MM-dd"); //日期字符串 } objData[21] = objCurrent.m_strCreateUserID; //存放记录的createUserid字符串 } m_dtmPreRecordDate = objCurrent.m_dtmRecordDate; #endregion ; #region 存放单项信息 //妊周 strText = objCurrent.m_strGestationWeeks_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strGestationWeeks_right != objCurrent.m_strGestationWeeks_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strGestationWeeks_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[5] = objclsDSTRichTextBoxValue; //体重 单位kg strText = objCurrent.m_strAvoirdupois_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strAvoirdupois_right != objCurrent.m_strAvoirdupois_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strAvoirdupois_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[6] = objclsDSTRichTextBoxValue; //主食量 (两) strText = objCurrent.m_strStapleMeasure_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strStapleMeasure_right != objCurrent.m_strStapleMeasure_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strStapleMeasure_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[7] = objclsDSTRichTextBoxValue; //胰岛素用量IU(长效) strText = objCurrent.m_strInsulinLong_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strInsulinLong_right != objCurrent.m_strInsulinLong_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strInsulinLong_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[8] = objclsDSTRichTextBoxValue; //胰岛素用量IU(短效) 早 strText = objCurrent.m_strInsulinShortMorning_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strInsulinShortMorning_right != objCurrent.m_strInsulinShortMorning_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strInsulinShortMorning_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[9] = objclsDSTRichTextBoxValue; //胰岛素用量IU(短效) 中 strText = objCurrent.m_strInsulinShortNoon_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strInsulinShortNoon_right != objCurrent.m_strInsulinShortNoon_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strInsulinShortNoon_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[10] = objclsDSTRichTextBoxValue; //胰岛素用量IU(短效) 晚 strText = objCurrent.m_strInsulinShortNight_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strInsulinShortNight_right != objCurrent.m_strInsulinShortNight_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strInsulinShortNight_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[11] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (空腹) strText = objCurrent.m_strBloodSugarLimosis_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarLimosis_right != objCurrent.m_strBloodSugarLimosis_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarLimosis_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[12] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (早饭 前) strText = objCurrent.m_strBloodSugarBe_BF_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarBe_BF_right != objCurrent.m_strBloodSugarBe_BF_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarBe_BF_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[13] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (早饭 后) strText = objCurrent.m_strBloodSugarAf_BF_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarAf_BF_right != objCurrent.m_strBloodSugarAf_BF_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarAf_BF_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[14] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (午饭 前) strText = objCurrent.m_strBloodSugarBe_Lun_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarBe_Lun_right != objCurrent.m_strBloodSugarBe_Lun_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarBe_Lun_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[15] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (午饭 后) strText = objCurrent.m_strBloodSugarAf_Lun_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarAf_Lun_right != objCurrent.m_strBloodSugarAf_Lun_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarAf_Lun_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[16] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (晚饭 前) strText = objCurrent.m_strBloodSugarBe_Sup_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarBe_Sup_right != objCurrent.m_strBloodSugarBe_Sup_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarBe_Sup_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[17] = objclsDSTRichTextBoxValue; //血糖定量 mmol/L (晚饭 后) strText = objCurrent.m_strBloodSugarAf_Sup_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strBloodSugarAf_Sup_right != objCurrent.m_strBloodSugarAf_Sup_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strBloodSugarAf_Sup_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[18] = objclsDSTRichTextBoxValue; //尿酮 strText = objCurrent.m_strUreaketone_right.ToString(); strXml = "<root />"; if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate && objNext.m_strUreaketone_right != objCurrent.m_strUreaketone_right) /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/ { strXml = m_strGetDSTTextXML(objCurrent.m_strUreaketone_right.ToString(), objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName); } objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[19] = objclsDSTRichTextBoxValue; if (objCurrent.objSignerArr != null) { //签名 strText = string.Empty; for (int j = 0; j < objCurrent.objSignerArr.Length; j++) { strText += objCurrent.objSignerArr[j].objEmployee.m_strGetTechnicalRankAndName + " "; } strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[20] = objclsDSTRichTextBoxValue; } else //从旧表导过来的数据没有电子签名 { clsEmrEmployeeBase_VO objEMP = null; clsHospitalManagerDomain objDomain = new clsHospitalManagerDomain(); long lngRes = objDomain.m_lngGetEmpByID(objCurrent.m_strCreateUserID, out objEMP); if (objEMP != null) { strText = objEMP.m_strLASTNAME_VCHR; strXml = "<root />"; objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = strText; objclsDSTRichTextBoxValue.m_strDSTXml = strXml; objData[20] = objclsDSTRichTextBoxValue; } objDomain = null; } #endregion objReturnData.Add(objData); } object[][] m_objRe = new object[objReturnData.Count][]; for (int m = 0; m < objReturnData.Count; m++) { m_objRe[m] = (object[])objReturnData[m]; } return(m_objRe); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } #endregion }
/// <summary> /// 根据XML格式设置DataGrid中的内容 /// </summary> /// <param name="strXML">主表中与DataGrid整体对应的XML字段内容</param> /// <param name="p_objclsElementAttributeArr">只需要赋值其中每项的m_blnIsDST和m_strElementName即可</param> /// <param name="p_dtgGrid">待设置内容的DataGrid名称</param> /// <returns>正确执行返回true,参数错误返回false</returns> public bool m_blnSetDataFromXML(string strXML, bool[] p_blnIsDSTArr, System.Xml.XmlParserContext p_objXmlParser, ref System.Windows.Forms.DataGrid p_dtgGrid) { if (strXML == null || strXML.Trim() == "" || p_blnIsDSTArr == null) { return(false); } DataTable dtbTable = (DataTable)p_dtgGrid.DataSource; p_dtgGrid.CurrentRowIndex = 0; dtbTable.Rows.Clear(); XmlTextReader objReader = new XmlTextReader(strXML, XmlNodeType.Element, p_objXmlParser); objReader.WhitespaceHandling = WhitespaceHandling.None; clsElementAttribute[] objclsElementAttributeArr = new clsElementAttribute[p_blnIsDSTArr.Length]; for (int j0 = 0; j0 < p_blnIsDSTArr.Length; j0++) { objclsElementAttributeArr[j0] = new clsElementAttribute(); objclsElementAttributeArr[j0].m_blnIsDST = p_blnIsDSTArr[j0]; //默认为非DST格式,即为bool类型 } int j2 = 0; while (objReader.Read()) { switch (objReader.NodeType) { case XmlNodeType.Element: // if (objReader.HasAttributes) { objclsElementAttributeArr[j2].m_strValue = objReader.GetAttribute("VALUE"); objclsElementAttributeArr[j2].m_strValueXML = objReader.GetAttribute("VALUEXML"); if (j2 == objclsElementAttributeArr.Length - 1) { Object[] objRes = new object[objclsElementAttributeArr.Length]; for (int k3 = 0; k3 < objclsElementAttributeArr.Length; k3++) { if (objclsElementAttributeArr[k3].m_blnIsDST == false) { objRes[k3] = objclsElementAttributeArr[k3].m_strValue == "True" ? true:false; } else { clsDSTRichTextBoxValue objclsDSTRichTextBoxValue = new clsDSTRichTextBoxValue(); objclsDSTRichTextBoxValue.m_strText = objclsElementAttributeArr[k3].m_strValue; objclsDSTRichTextBoxValue.m_strDSTXml = objclsElementAttributeArr[k3].m_strValueXML; objRes[k3] = objclsDSTRichTextBoxValue; } } dtbTable.Rows.Add(objRes); j2 = 0; } else { j2++; } } break; } } return(true); }