Exemple #1
0
        /// <summary>
        /// 删除仪器关联
        /// </summary>
        /// <param name="p_objRelation"></param>
        /// <param name="p_blnReleaseDeviceSample"></param>
        /// <returns></returns>
        public long m_lngDeleteDeviceRelation(clsT_LIS_DeviceRelationVO p_objRelation, bool p_blnReleaseDeviceSample)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.LIS.clsSampleSvc objSvc =
                (com.digitalwave.iCare.middletier.LIS.clsSampleSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.LIS.clsSampleSvc));
            lngRes = objSvc.m_lngDeleteDeviceRelation(objPrincipal, p_objRelation);
            //			objSvc.Dispose();
            return(lngRes);
        }
Exemple #2
0
        public long m_lngReceptSample(clsT_OPR_LIS_SAMPLE_VO p_objSampleVO, clsT_LIS_DeviceRelationVO p_objDeviceRelationVO)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.LIS.clsSampleSvc objSvc =
                (com.digitalwave.iCare.middletier.LIS.clsSampleSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.LIS.clsSampleSvc));
            lngRes = objSvc.m_lngReceptSample(objPrincipal, p_objSampleVO, p_objDeviceRelationVO);
//			objSvc.Dispose();
            return(lngRes);
        }
Exemple #3
0
        /// <summary>
        /// 删除仪器关联
        /// </summary>
        /// <param name="p_objSourceVO"></param>
        /// <param name="p_objTargetVO"></param>
        /// <returns></returns>
        public long m_lngModifyBind(clsT_LIS_DeviceRelationVO p_objSourceVO, clsT_LIS_DeviceRelationVO p_objTargetVO)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.LIS.clsSampleSvc objSvc =
                (com.digitalwave.iCare.middletier.LIS.clsSampleSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.LIS.clsSampleSvc));
            lngRes = objSvc.m_lngModifyBind(objPrincipal, p_objSourceVO, p_objTargetVO);
            //			objSvc.Dispose();
            return(lngRes);
        }
Exemple #4
0
        public bool m_blnIsRegularSampleCode(string p_strSampleCode)
        {
            clsT_LIS_DeviceRelationVO objDRVO = null;
            long lngRes = this.m_lngGetDRVOFromSampleCode(p_strSampleCode, out objDRVO);

            if (lngRes == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #5
0
        public clsT_LIS_DeviceRelationVO m_objConstructDeviceRelationVO(System.Data.DataRow p_objRow)
        {
            clsT_LIS_DeviceRelationVO objVO = new clsT_LIS_DeviceRelationVO();

            try
            {
                objVO = new clsT_LIS_DeviceRelationVO();
                objVO.m_strDEVICEID_CHR = p_objRow["DEVICEID_CHR"].ToString().Trim();
                objVO.m_strSEQ_ID_CHR   = p_objRow["SEQ_ID_CHR"].ToString().Trim();
                if (p_objRow["IMPORT_REQ_INT"].ToString().Trim() != "")
                {
                    objVO.m_intIMPORT_REQ_INT = int.Parse(p_objRow["IMPORT_REQ_INT"].ToString().Trim());
                }
                if (Microsoft.VisualBasic.Information.IsDate(p_objRow["RECEPTION_DAT"]))
                {
                    objVO.m_strRECEPTION_DAT = Convert.ToDateTime(p_objRow["RECEPTION_DAT"]).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                }
                else
                {
                    objVO.m_strRECEPTION_DAT = null;
                }
                objVO.m_strDEVICE_SAMPLEID_CHR = p_objRow["DEVICE_SAMPLEID_CHR"].ToString().Trim();
                if (Microsoft.VisualBasic.Information.IsDate(p_objRow["CHECK_DAT"]))
                {
                    objVO.m_strCHECK_DAT = Convert.ToDateTime(p_objRow["CHECK_DAT"]).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                }
                else
                {
                    objVO.m_strCHECK_DAT = null;
                }
                objVO.m_strSAMPLE_ID_CHR     = p_objRow["SAMPLE_ID_CHR"].ToString().Trim();
                objVO.m_strPOSITIONID_CHR    = p_objRow["POSITIONID_CHR"].ToString().Trim();
                objVO.m_intSTATUS_INT        = Convert.ToInt32(p_objRow["STATUS_INT"].ToString().Trim());
                objVO.m_strSEQ_ID_DEVICE_CHR = p_objRow["SEQ_ID_DEVICE_CHR"].ToString().Trim();
                objVO.m_intBIND_METHOD_INT   = Convert.ToInt32(p_objRow["BIND_METHOD_INT"].ToString().Trim());
            }
            catch
            {
                objVO = null;
            }
            return(objVO);
        }
Exemple #6
0
        public long m_lngDecode(string p_strCheckNO, out clsT_LIS_DeviceRelationVO[] p_objDRVOArr)
        {
            System.Collections.Hashtable hasDevices = new System.Collections.Hashtable();
            p_objDRVOArr = null;
            System.Collections.ArrayList arlTemp = new System.Collections.ArrayList();
            string[] strSampleCodeArr            = null;
            long     lngRes = m_lngGetSampleCodes(p_strCheckNO, out strSampleCodeArr);

            if (lngRes == 1 && strSampleCodeArr != null)
            {
                for (int i = 0; i < strSampleCodeArr.Length; i++)//循环解析每个 SampleCode
                {
                    clsT_LIS_DeviceRelationVO objDRVO = null;
                    lngRes = -1;
                    lngRes = m_lngGetDRVOFromSampleCode(strSampleCodeArr[i], out objDRVO);
                    if (lngRes == 1 && objDRVO != null)
                    {
                        arlTemp.Add(objDRVO);
                        if (hasDevices.ContainsKey(objDRVO.m_strDEVICEID_CHR))
                        {
                            lngRes = -2;//重复仪器
                            break;
                        }
                        hasDevices.Add(objDRVO.m_strDEVICEID_CHR, null);
                    }
                    else if (lngRes != 1)
                    {
                        break;
                    }
                }
                if (arlTemp.Count != 0)
                {
                    p_objDRVOArr = (clsT_LIS_DeviceRelationVO[])arlTemp.ToArray(typeof(clsT_LIS_DeviceRelationVO));
                }
            }
            if (lngRes != 1)
            {
                p_objDRVOArr = null;
            }
            return(lngRes);
        }
Exemple #7
0
        public void m_mthInValidatDeviceRelation()
        {
            if (m_objViewer.m_lsvDeviceRelation.SelectedItems.Count <= 0)
            {
                return;
            }
            long lngRes = 0;

            int[] intSelectedIndices = new int[m_objViewer.m_lsvDeviceRelation.SelectedIndices.Count];
            m_objViewer.m_lsvDeviceRelation.SelectedIndices.CopyTo(intSelectedIndices, 0);

            for (int i = 0; i < m_objViewer.m_lsvDeviceRelation.SelectedItems.Count; i++)
            {
                clsT_LIS_DeviceRelationVO objRecord = (clsT_LIS_DeviceRelationVO)m_objViewer.m_lsvDeviceRelation.SelectedItems[i].Tag;
                if (objRecord.m_intSTATUS_INT == 0)
                {
                    continue;
                }
                //判断是否是已审核或已退回
                if (objRecord.m_intSAMPLE_STATUS_INT >= 6)
                {
                    MessageBox.Show("已审核或已退回的标本不能作废关联!");
                    return;
                }
                else if (objRecord.m_intSAMPLE_STATUS_INT == 0)
                {
                    continue;
                }

                if (objRecord.m_intSTATUS_INT == 2)
                {
                    //				DialogResult dlgRes = MessageBox.Show("是否作废与该样本绑定的仪器数据?","作废仪器数据",MessageBoxButtons.YesNo,MessageBoxIcon.None,MessageBoxDefaultButton.Button2);
                    //				if(dlgRes == DialogResult.Yes)
                    //				{
                    //					//作废仪器数据
                    //					lngRes = m_objManage.m_lngSetResultImportReqStatus(objRecord.m_strDEVICEID_CHR,objRecord.m_strDEVICE_SAMPLEID_CHR,objRecord.m_strCHECK_DAT,
                    //						"0");
                    //				}
                    //				else if(dlgRes == DialogResult.No)
                    //				{
                    //设仪器数据为未绑定
                    lngRes = m_objManage.m_lngSetResultImportReqStatus(objRecord.m_strDEVICEID_CHR, objRecord.m_strDEVICE_SAMPLEID_CHR, objRecord.m_strCHECK_DAT,
                                                                       "1");
                    //				}
                }
                else if (objRecord.m_intSTATUS_INT == 1)
                {
                    lngRes = 1;
                }
                objRecord.m_intSTATUS_INT = 0;
                //作废仪器样本关系
                if (lngRes > 0)
                {
                    //设该仪器样本关系为未绑定
                    lngRes = m_objSampleManage.m_lngSetLisDeviceRelation(objRecord);
                }
            }
            if (lngRes > 0)
            {
                m_mthGetDeviceRelationVOArrByCondition();
                m_objViewer.m_lsvDeviceRelation.Focus();
                for (int i = 0; i < intSelectedIndices.Length; i++)
                {
                    m_objViewer.m_lsvDeviceRelation.Items[intSelectedIndices[i]].Selected = true;
                    m_objViewer.m_lsvDeviceRelation.Items[intSelectedIndices[i]].EnsureVisible();
                }
            }
        }
Exemple #8
0
        public long m_lngGetDRVOFromSampleCode(string p_strSampleCode, out clsT_LIS_DeviceRelationVO p_objDRVO)
        {
            p_objDRVO = null;
            if (p_strSampleCode == null)
            {
                return(-1);
            }

            long lngRes = -1;

            if (m_blnIsDeviceCodeSeparator)
            {
                try
                {
                    string[] strCodeArr = p_strSampleCode.Split(m_strDeviceCodeSeparator.ToCharArray());
                    if (strCodeArr == null || strCodeArr.Length != 2)
                    {
                        return(-1);
                    }
                    string strDeviceID = null;
                    object objValue    = m_hasDeviceCode[strCodeArr[0]];
                    if (objValue != null)
                    {
                        strDeviceID = objValue.ToString();
                    }

                    if (strDeviceID != null)
                    {
                        p_objDRVO = new clsT_LIS_DeviceRelationVO();
                        p_objDRVO.m_strDEVICEID_CHR        = strDeviceID;
                        p_objDRVO.m_strDEVICE_SAMPLEID_CHR = strCodeArr[1];
                    }
                    lngRes = 1;
                }
                catch (Exception ex)
                {
                    lngRes    = 0;
                    p_objDRVO = null;
                }
            }
            else
            {
                try
                {
                    if (p_strSampleCode.Length < m_intDeviceCodeLength)
                    {
                        return(-1);
                    }
                    string strDeviceCode     = p_strSampleCode.Substring(0, m_intDeviceCodeLength);
                    string strDeviceSampleID = p_strSampleCode.Substring(m_intDeviceCodeLength, p_strSampleCode.Length - m_intDeviceCodeLength);
                    object objValue          = m_hasDeviceCode[strDeviceCode];
                    string strDeviceID       = null;
                    if (objValue != null)
                    {
                        strDeviceID = objValue.ToString();
                    }
                    if (strDeviceID != null)
                    {
                        p_objDRVO = new clsT_LIS_DeviceRelationVO();
                        p_objDRVO.m_strDEVICEID_CHR        = strDeviceID;
                        p_objDRVO.m_strDEVICE_SAMPLEID_CHR = strDeviceSampleID;
                    }
                    lngRes = 1;
                }
                catch (Exception ex)
                {
                    lngRes    = 0;
                    p_objDRVO = null;
                }
            }
            return(lngRes);
        }