Beispiel #1
0
        /// <summary>
        /// 创建申请单的报告组【3】
        /// </summary>
        private void m_mthGenerateAppReports()
        {
            clsAppSampleGroupCollection objSampleGroups = m_objGenerateAppSampleGroups();

            foreach (clsLIS_AppSampleGroup objAppSampleGroup in objSampleGroups)
            {
                bool blnAppReportGroupExist = false;

                clsReportGroup_VO objReportGroupVO = null;
                long lngRes = clsReportGroupSmp.s_obj.m_lngGetReportGoupVO(objAppSampleGroup.m_ObjDataVO.m_strSAMPLE_GROUP_ID_CHR, out objReportGroupVO);

                if (lngRes > 0 && objReportGroupVO != null)
                {
                    objAppSampleGroup.m_ObjDataVO.m_strREPORT_GROUP_ID_CHR = objReportGroupVO.strReportGroupID;
                    foreach (clsLIS_AppCheckItem objAppCheckItem in objAppSampleGroup.m_ObjAppCheckItems)
                    {
                        objAppCheckItem.m_ObjDataVO.m_strREPORT_GROUP_ID_CHR = objReportGroupVO.strReportGroupID;
                    }

                    foreach (clsLIS_AppCheckReport objAppCheckReport in this.m_objAppReports)
                    {
                        if (objAppCheckReport.m_ObjCheckReport.m_ObjDataVO.strReportGroupID == objReportGroupVO.strReportGroupID)
                        {
                            objAppCheckReport.m_ObjAppSampleGroups.Add(objAppSampleGroup);
                            System.Collections.ArrayList arlSGID = new System.Collections.ArrayList();
                            if (objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr != null)
                            {
                                arlSGID.AddRange(objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr);
                            }
                            arlSGID.Add(objAppSampleGroup.m_StrSampleGroupID);
                            objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr = (string[])arlSGID.ToArray(typeof(string));
                            blnAppReportGroupExist = true;
                            break;
                        }
                    }
                    if (!blnAppReportGroupExist)
                    {
                        clsLIS_CheckReport objCheckReport = new clsLIS_CheckReport();
                        objCheckReport.m_ObjDataVO = objReportGroupVO;
                        clsT_OPR_LIS_APP_REPORT_VO objAppReportVO = new clsT_OPR_LIS_APP_REPORT_VO();
                        clsLIS_AppCheckReport      objAppReport   = new clsLIS_AppCheckReport(objAppReportVO);
                        objAppReport.m_ObjCheckReport   = objCheckReport;
                        objAppReport.m_StrReportGroupID = objCheckReport.m_ObjDataVO.strReportGroupID;
                        objAppReport.m_ObjAppSampleGroups.Add(objAppSampleGroup);
                        objAppReport.m_ObjDataVO.m_strSampleGroupIDArr = new string[] { objAppSampleGroup.m_StrSampleGroupID };
                        objAppReport.m_IntStatus = 1;

                        m_objAppReports.Add(objAppReport);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 形成申请单报告组的标本组【4】
        /// </summary>
        /// <returns></returns>
        private clsAppSampleGroupCollection m_objGenerateAppSampleGroups()
        {
            m_objGenerateAppUnitItems();

            clsAppSampleGroupCollection objSampleGroups = new clsAppSampleGroupCollection();

            foreach (clsLIS_AppApplyUnit objAppUnit in m_objAppApplyUnits)
            {
                // 样本组是否存在
                bool blnAppSampleGroupExist = false;

                clsSampleGroup_VO objSampleGroupVO = null;
                long lngRes = clsSampleGroupSmp.s_obj.m_lngGetSampleGoupVO(objAppUnit.m_StrApplyUnitID, out objSampleGroupVO);

                if (lngRes > 0 && objSampleGroupVO != null)
                {
                    clsLIS_AppSampleGroup objAppSampleGroup = null;
                    foreach (clsLIS_AppSampleGroup obj in objSampleGroups)
                    {
                        if (obj.m_ObjSampleGroup.m_ObjDataVO.strSampleGroupID == objSampleGroupVO.strSampleGroupID)
                        {
                            objAppSampleGroup      = obj;
                            blnAppSampleGroupExist = true;
                            break;
                        }
                    }

                    if (!blnAppSampleGroupExist)
                    {
                        clsLIS_SampleGroup objSampleGroup = new clsLIS_SampleGroup();
                        objSampleGroup.m_ObjDataVO = objSampleGroupVO;
                        clsT_OPR_LIS_APP_SAMPLE_VO objAppSampleGroupVO = new clsT_OPR_LIS_APP_SAMPLE_VO();
                        clsLIS_AppSampleGroup      objAppSGroup        = new clsLIS_AppSampleGroup(objAppSampleGroupVO);
                        objAppSGroup.m_ObjSampleGroup   = objSampleGroup;
                        objAppSGroup.m_StrSampleGroupID = objSampleGroup.m_ObjDataVO.strSampleGroupID;
                        objSampleGroups.Add(objAppSGroup);
                        objAppSampleGroup = objAppSGroup;
                    }

                    System.Collections.ArrayList arlSU = new System.Collections.ArrayList();

                    if (objAppSampleGroup.m_ObjAppUnitArr != null)
                    {
                        arlSU.AddRange(objAppSampleGroup.m_ObjAppUnitArr);
                    }

                    arlSU.Add(objAppUnit);
                    objAppSampleGroup.m_ObjAppUnitArr = (clsLIS_AppApplyUnit[])arlSU.ToArray(typeof(clsLIS_AppApplyUnit));

                    for (int i = 0; i < objAppUnit.m_ObjItemArr.Length; i++)
                    {
                        bool blnItemExist = false;
                        foreach (clsLIS_AppCheckItem objAppItem in objAppSampleGroup.m_ObjAppCheckItems)
                        {
                            if (objAppItem.m_StrCheckItemID == objAppUnit.m_ObjItemArr[i].m_strCHECK_ITEM_ID_CHR)
                            {
                                blnItemExist = true;
                                break;
                            }
                        }
                        if (!blnItemExist)
                        {
                            clsT_OPR_LIS_APP_CHECK_ITEM_VO objAppItemVO    = new clsT_OPR_LIS_APP_CHECK_ITEM_VO();
                            clsLIS_AppCheckItem            objAppCheckItem = new clsLIS_AppCheckItem(objAppItemVO);

                            objAppCheckItem.m_StrCheckItemID   = objAppUnit.m_ObjItemArr[i].m_strCHECK_ITEM_ID_CHR;
                            objAppCheckItem.m_StrSampleGroupID = objAppSampleGroup.m_StrSampleGroupID;
                            objAppSampleGroup.m_ObjAppCheckItems.Add(objAppCheckItem);
                        }
                    }
                }
            }
            return(objSampleGroups);
        }