Exemplo n.º 1
0
        private void m_mthSetPrintContent(clsTransDataInfo[] p_objTransDataArr,
                                          DateTime[] p_dtmFirstPrintDate)
        {
            try
            {
                if (p_objTransDataArr == null || p_dtmFirstPrintDate == null || p_objTransDataArr.Length != p_dtmFirstPrintDate.Length)
                {
                    // clsPublicFunction.ShowInformationMessageBox("打印数据有误!");E:\icar_fo2\Code\EMR\icare\PrintTool\clsICUNurseRecordPrintTool.cs
                    return;
                }

                //根据不同的表单类型,获取对应的clsDiseaseTrackInfo
                clsDiseaseTrackInfo objTrackInfo = null;
                m_objPrintDataArr = new clsEMR_intbloodsugarwatchDataInfo[p_objTransDataArr.Length];
                //				m_objPrintDataArr=(clsIntensiveTendDataInfo[])(p_objTransDataArr.Clone());
                ArrayList arlTemp = new ArrayList();
                arlTemp.AddRange(p_objTransDataArr);
                m_objPrintDataArr = (clsEMR_intbloodsugarwatchDataInfo[])arlTemp.ToArray(typeof(clsEMR_intbloodsugarwatchDataInfo));

                //System.Data.DataTable dtbBlankRecord = null;
                //new clsDiseaseTrackAddBlankDomain().m_lngGetBlankRecordContent(m_objPrintInfo.m_strInPatentID,m_objPrintInfo.m_dtmInPatientDate,out dtbBlankRecord);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void m_mthAddDataToGrid(PrintPageEventArgs e)
        {
            if (m_objPrintInfo == null)
            {
                e.HasMorePages = false;
                return;
            }
            int intYPos = 172;

            for (; m_intLines < m_objPrintInfo.m_objTransDataArr.Length;)
            {
                // m_objValues;
                clsEMR_intbloodsugarwatchDataInfo p_objdata = new clsEMR_intbloodsugarwatchDataInfo();
                // clsEMR_intbloodsugarwatchValue clsGereralData = new clsEMR_intbloodsugarwatchValue();
                p_objdata = (clsEMR_intbloodsugarwatchDataInfo)m_objPrintInfo.m_objTransDataArr[m_intLines];
                if (p_objdata.m_objRecordArr.Length != 0)
                {
                    m_objValues = p_objdata.m_objRecordArr;
                    for (int i = 0; i < m_objValues.Length; i++)
                    {
                        // m_objPrintInfo.m_objTransDataArr[m_intLines].m_objRecordContent
                        // e.Graphics.DrawString(clsGereralData.m_objRecordContent.m_dtmCreateDate.ToString(m_strDateFormat), new Font("SimSun", 10), m_slbBrush, (int)enmRectangleInfo.LeftX, intYPos);
                        e.Graphics.DrawString(m_objValues[i].m_dtmRecordDate.ToString("yyyy年MM月dd日"), m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 10, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strNULLABDOMEN_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 135, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strTWOBREAKFAST_RIGTH, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 195, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strBEFORELUNCH_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 260, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strTWOAFTERLUNCH_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 325, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strBEFOREDINNER_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 380, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strTWOAFTERDINNER_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 430, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strBEFORESLEEP_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 495, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].m_strBEIZHU_RIGHT, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 555, intYPos + (int)enmRectangleInfo.RowStep);
                        e.Graphics.DrawString(m_objValues[i].objSignerArr[0].objEmployee.ToString(), m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 600, intYPos + (int)enmRectangleInfo.RowStep);

                        // e.Graphics.DrawString(m_objValues[i].m_strBEFOREDINNER_VCHR, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 471, intYPos);
                        // e.Graphics.DrawString(clsGereralData.m_objRecordContent.m_strBEFORESLEEP_VCHR, m_fotSmallFont, m_slbBrush, (int)enmRectangleInfo.LeftX + 606, intYPos);
                        intYPos += (int)enmRectangleInfo.RowStep;
                        m_intLines++;
                        if (m_intLines % 35 == 0)
                        {
                            m_intPages++;
                            e.HasMorePages = true;
                            return;
                        }
                    }
                }
            }
            e.HasMorePages = false;
        }
Exemplo n.º 3
0
        /// <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_intbloodsugarwatchDataInfo objInfo = null;

                objInfo = p_objTransDataInfo as clsEMR_intbloodsugarwatchDataInfo;

                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[15];
                    clsEMR_intbloodsugarwatchValue objCurrent = objInfo.m_objRecordArr[i];
                    clsEMR_intbloodsugarwatchValue objNext    = new clsEMR_intbloodsugarwatchValue();//下一条记录



                    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_IntBloodSugarWatch; //存放记录类型的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[14] = 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;
                    //空腹
                    strText = objCurrent.m_strNULLABDOMEN_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strNULLABDOMEN_RIGHT != objCurrent.m_strNULLABDOMEN_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strNULLABDOMEN_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[5] = objclsDSTRichTextBoxValue;
                    //早餐后2小时
                    strText = objCurrent.m_strTWOBREAKFAST_RIGTH;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strTWOBREAKFAST_RIGTH != objCurrent.m_strTWOBREAKFAST_RIGTH)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strTWOBREAKFAST_RIGTH, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[6] = objclsDSTRichTextBoxValue;
                    //中餐前
                    strText = objCurrent.m_strBEFORELUNCH_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strBEFORELUNCH_RIGHT != objCurrent.m_strBEFORELUNCH_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strBEFORELUNCH_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[7] = objclsDSTRichTextBoxValue;
                    //中餐2小时
                    strText = objCurrent.m_strTWOAFTERLUNCH_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strTWOAFTERLUNCH_RIGHT != objCurrent.m_strTWOAFTERLUNCH_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strTWOAFTERLUNCH_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[8] = objclsDSTRichTextBoxValue;
                    //晚餐前
                    strText = objCurrent.m_strBEFOREDINNER_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strBEFOREDINNER_RIGHT != objCurrent.m_strBEFOREDINNER_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strBEFOREDINNER_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[9] = objclsDSTRichTextBoxValue;
                    //晚餐后2小时
                    strText = objCurrent.m_strTWOAFTERDINNER_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strTWOAFTERDINNER_RIGHT != objCurrent.m_strTWOAFTERDINNER_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strTWOAFTERDINNER_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[10] = objclsDSTRichTextBoxValue;
                    //睡前
                    strText = objCurrent.m_strBEFORESLEEP_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strBEFORESLEEP_RIGHT != objCurrent.m_strBEFORESLEEP_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strBEFORESLEEP_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[11] = objclsDSTRichTextBoxValue;
                    //备注
                    strText = objCurrent.m_strBEIZHU_RIGHT;
                    strXml  = "<root />";
                    if (objNext != null && objNext.m_dtmCreateDate == objCurrent.m_dtmCreateDate &&
                        objNext.m_strBEIZHU_RIGHT != objCurrent.m_strBEIZHU_RIGHT)   /*objNext的记录内容与objCurrent的记录内容不一致,文本需要加双划线*/
                    {
                        strXml = m_strGetDSTTextXML(objCurrent.m_strBEIZHU_RIGHT, objCurrent.m_strModifyUserID, objCurrent.m_strModifyUserName);
                    }
                    objclsDSTRichTextBoxValue             = new clsDSTRichTextBoxValue();
                    objclsDSTRichTextBoxValue.m_strText   = strText;
                    objclsDSTRichTextBoxValue.m_strDSTXml = strXml;
                    objData[12] = 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[13] = 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[13] = 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
        }