Esempio n. 1
0
        /// <summary>
        /// 插入样本回馈表信息
        /// </summary>
        /// <param name="p_objSampleFeedBack"></param>
        /// <returns></returns>
        public long m_lngInsertSampleFeedBack(clslissample_feedback p_objSampleFeedBack)
        {
            long         lngRes = 0;
            clsSampleSvc objSvc =
                (com.digitalwave.iCare.middletier.LIS.clsSampleSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.LIS.clsSampleSvc));

            lngRes = objSvc.m_lngInsertSampleFeedBack(p_objSampleFeedBack);
            return(lngRes);
        }
Esempio n. 2
0
        /// <summary>
        /// 修改采样人员
        /// </summary>
        /// <param name="p_strEmpId"></param>
        /// <param name="p_strSampleId"></param>
        /// <returns></returns>
        public long m_lngInsertCollector(string p_strEmpId, string p_strSampleId, string p_strApplicationID)
        {
            long         lngRes = 0;
            clsSampleSvc objSvc =
                (com.digitalwave.iCare.middletier.LIS.clsSampleSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.LIS.clsSampleSvc));

            lngRes = objSvc.m_lngInsertCollector(objPrincipal, p_strEmpId, p_strSampleId, p_strApplicationID);
            return(lngRes);
        }
Esempio n. 3
0
        public long m_lngAddNewAppAndSampleInfoWithBarcode(
            IPrincipal principal,
            clsLisApplMainVO applMain, out clsLisApplMainVO applMainOut,
            clsT_OPR_LIS_APP_REPORT_VO[] arrReports, clsT_OPR_LIS_APP_SAMPLE_VO[] arrSamples,
            clsT_OPR_LIS_APP_CHECK_ITEM_VO[] arrCheckItems, clsT_OPR_LIS_APP_APPLY_UNIT_VO[] arrApplyUnits,
            clsLisAppUnitItemVO[] arrUnitItemRelations)
        {
            applMainOut = applMain;
            long lngRes  = 0;
            long lngReff = 0;

            if (applMain == null)
            {
                return(-2);
            }

            try
            {
                lngRes   = 0;
                lngRes   = m_lngAddNewAppl(applMain, out applMainOut);
                applMain = applMainOut;

                if (lngRes > 0)
                {
                    #region 赋申请单ID
                    for (int i = 0; i < arrReports.Length; i++)
                    {
                        arrReports[i].m_strAPPLICATION_ID_CHR = applMain.m_strAPPLICATION_ID;
                    }
                    for (int i = 0; i < arrSamples.Length; i++)
                    {
                        arrSamples[i].m_strAPPLICATION_ID_CHR = applMain.m_strAPPLICATION_ID;
                    }
                    for (int i = 0; i < arrCheckItems.Length; i++)
                    {
                        arrCheckItems[i].m_strAPPLICATION_ID_CHR = applMain.m_strAPPLICATION_ID;
                    }
                    for (int i = 0; i < arrApplyUnits.Length; i++)
                    {
                        arrApplyUnits[i].m_strAPPLICATION_ID_CHR = applMain.m_strAPPLICATION_ID;
                    }
                    for (int i = 0; i < arrUnitItemRelations.Length; i++)
                    {
                        arrUnitItemRelations[i].m_strAPPLICATION_ID_CHR = applMain.m_strAPPLICATION_ID;
                    }
                    #endregion
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewReportGroup(arrReports);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppSampleGroup(arrSamples);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppCheckItem(arrCheckItems);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppApplyUint(arrApplyUnits);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppUintItemArr(arrUnitItemRelations);
                }
                if (lngRes > 0)
                {
                    //自动生成barcode号
                    clsHRPTableService objHRPSvc  = new clsHRPTableService();
                    string             strSQL     = @"select seq_lis_barcode.nextval from dual";
                    DataTable          dtResult   = new DataTable();
                    string             strBarcode = "";
                    lngRes = 0;
                    lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtResult);
                    if (lngRes > 0)
                    {
                        if (dtResult.Rows[0][0] == System.DBNull.Value)
                        {
                            strBarcode = "";
                        }
                        else
                        {
                            strBarcode = dtResult.Rows[0][0].ToString();
                        }
                    }
                    dtResult  = null;
                    objHRPSvc = null;

                    clsT_OPR_LIS_SAMPLE_VO objSampleVO = new clsT_OPR_LIS_SAMPLE_VO();

                    #region 构造SampleVO

                    objSampleVO.m_strAPPL_DAT                 = applMain.m_strAppl_Dat;
                    objSampleVO.m_strSEX_CHR                  = applMain.m_strSex;
                    objSampleVO.m_strPATIENT_NAME_VCHR        = applMain.m_strPatient_Name;
                    objSampleVO.m_strPATIENT_SUBNO_CHR        = applMain.m_strPatient_SubNO;
                    objSampleVO.m_strAGE_CHR                  = applMain.m_strAge;
                    objSampleVO.m_strPATIENT_TYPE_CHR         = applMain.m_strPatientType;
                    objSampleVO.m_strDIAGNOSE_VCHR            = applMain.m_strDiagnose;
                    objSampleVO.m_strBEDNO_CHR                = applMain.m_strBedNO;
                    objSampleVO.m_strICD_VCHR                 = applMain.m_strICD;
                    objSampleVO.m_strPATIENTCARDID_CHR        = applMain.m_strPatientcardID;
                    objSampleVO.m_strPATIENTID_CHR            = applMain.m_strPatientID;
                    objSampleVO.m_strAPPL_EMPID_CHR           = applMain.m_strAppl_EmpID;
                    objSampleVO.m_strAPPL_DEPTID_CHR          = applMain.m_strAppl_DeptID;
                    objSampleVO.m_strAPPLICATION_ID_CHR       = applMain.m_strAPPLICATION_ID;
                    objSampleVO.m_strPATIENT_INHOSPITALNO_CHR = applMain.m_strPatient_inhospitalno_chr;
                    objSampleVO.m_strSAMPLE_TYPE_ID_CHR       = applMain.m_strSampleTypeID;
                    objSampleVO.m_strSAMPLETYPE_VCHR          = applMain.m_strSampleType;
                    objSampleVO.m_intSTATUS_INT               = 3;
                    objSampleVO.m_strQCSAMPLEID_CHR           = "-1";

                    objSampleVO.m_strSAMPLEKIND_CHR = "1";
                    objSampleVO.m_strSAMPLE_ID_CHR  = null;

                    objSampleVO.m_strSAMPLESTATE_VCHR = "";

                    if (strBarcode.Trim() != "")
                    {
                        strBarcode = strBarcode.PadLeft(9, '0');
                    }

                    objSampleVO.m_strBARCODE_VCHR = strBarcode;

                    objSampleVO.m_strOPERATOR_ID_CHR = applMain.m_strOperator_ID;

                    objSampleVO.m_strSAMPLING_DATE_DAT = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                    objSampleVO.m_strCOLLECTOR_ID_CHR = null;

                    objSampleVO.m_strACCEPTOR_ID_CHR = applMain.m_strOperator_ID;

                    objSampleVO.m_strACCEPT_DAT = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                    #endregion

                    lngRes = 0;
                    lngRes = new clsSampleSvc().m_lngAddNewSampleAndModifyAppSampleGroup(principal, objSampleVO.m_strAPPLICATION_ID_CHR, objSampleVO);
                    for (int i = 0; i < arrSamples.Length; i++)
                    {
                        arrSamples[i].m_strSAMPLE_ID_CHR = objSampleVO.m_strSAMPLE_ID_CHR;
                    }
                }
                if (lngRes <= 0)
                {
                    throw new Exception(string.Empty);
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
                throw objEx;
            }

            return(lngRes);
        }
Esempio n. 4
0
        public long m_lngAddNewAppAndSampleInfoWithBarcode(IPrincipal p_objPrincipal, clsLisApplMainVO p_objLisApplMainVO,
                                                           out clsLisApplMainVO p_objLisApplMainOutVO, clsT_OPR_LIS_APP_REPORT_VO[] p_objReportArr,
                                                           clsT_OPR_LIS_APP_SAMPLE_VO[] p_objAppSampleArr, clsT_OPR_LIS_APP_CHECK_ITEM_VO[] p_objAppItemArr,
                                                           clsT_OPR_LIS_APP_APPLY_UNIT_VO[] p_objAppUnitArr, clsLisAppUnitItemVO[] p_objAppUnitItemArr)
        {
            p_objLisApplMainOutVO = p_objLisApplMainVO;
            long lngRes = 0;

            if (p_objLisApplMainVO == null)
            {
                throw new Exception("检验申请单信息为空!");
            }

            try
            {
                lngRes = 0;
                lngRes = m_lngAddNewAppl(p_objLisApplMainVO, out p_objLisApplMainOutVO);

                p_objLisApplMainVO = p_objLisApplMainOutVO;

                #region 赋申请单ID

                if (lngRes > 0)
                {
                    for (int i = 0; i < p_objReportArr.Length; i++)
                    {
                        p_objReportArr[i].m_strAPPLICATION_ID_CHR = p_objLisApplMainVO.m_strAPPLICATION_ID;
                    }

                    for (int i = 0; i < p_objAppSampleArr.Length; i++)
                    {
                        p_objAppSampleArr[i].m_strAPPLICATION_ID_CHR = p_objLisApplMainVO.m_strAPPLICATION_ID;
                    }

                    for (int i = 0; i < p_objAppItemArr.Length; i++)
                    {
                        p_objAppItemArr[i].m_strAPPLICATION_ID_CHR = p_objLisApplMainVO.m_strAPPLICATION_ID;
                    }

                    for (int i = 0; i < p_objAppUnitArr.Length; i++)
                    {
                        p_objAppUnitArr[i].m_strAPPLICATION_ID_CHR = p_objLisApplMainVO.m_strAPPLICATION_ID;
                    }

                    for (int i = 0; i < p_objAppUnitItemArr.Length; i++)
                    {
                        p_objAppUnitItemArr[i].m_strAPPLICATION_ID_CHR = p_objLisApplMainVO.m_strAPPLICATION_ID;
                    }
                }

                #endregion

                #region 生成报告单、样本组、检验项目表信息

                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngInsertAppReportRecord(p_objReportArr);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppSampleGroup(p_objAppSampleArr);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppCheckItem(p_objAppItemArr);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppApplyUint(p_objAppUnitArr);
                }
                if (lngRes > 0)
                {
                    lngRes = 0;
                    lngRes = m_lngAddNewAppUintItemArr(p_objAppUnitItemArr);
                }

                #endregion

                if (lngRes > 0)
                {
                    //自动生成barcode号

                    clsHRPTableService objHRPSvc  = new clsHRPTableService();
                    string             strSQL     = @"select seq_lis_barcode.NEXTVAL from dual";
                    DataTable          dtResult   = new DataTable();
                    string             strBarcode = "";

                    lngRes = 0;
                    lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtResult);
                    if (lngRes > 0)
                    {
                        if (dtResult.Rows[0][0] == System.DBNull.Value)
                        {
                            strBarcode = "";
                        }
                        else
                        {
                            strBarcode = dtResult.Rows[0][0].ToString();
                        }
                    }

                    clsT_OPR_LIS_SAMPLE_VO objSampleVO = ConstructSampleVO(p_objLisApplMainVO, strBarcode);

                    lngRes = new clsSampleSvc().m_lngAddNewSampleAndModifyAppSampleGroup(p_objPrincipal, objSampleVO.m_strAPPLICATION_ID_CHR, objSampleVO);

                    for (int i = 0; i < p_objAppSampleArr.Length; i++)
                    {
                        p_objAppSampleArr[i].m_strSAMPLE_ID_CHR = objSampleVO.m_strSAMPLE_ID_CHR;
                    }
                }

                if (lngRes <= 0)
                {
                    throw new Exception("生成申请单失败!");
                }
            }
            catch (Exception ex)
            {
                ThrowException(ex);
            }

            return(lngRes);
        }