示例#1
0
        /// 保存信息
        public long m_lngSave(clsMRIApply_All p_objclsMRIApply_All, bool p_blnIsAddNew)
        {
            long lngRes = 0;

            clsMRIApplyServ m_objServ =
                (clsMRIApplyServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMRIApplyServ));

            try
            {
                if (p_blnIsAddNew == true)
                {
                    lngRes = m_objServ.m_lngAddNew(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, m_strGetMainXML(p_objclsMRIApply_All.m_objclsMRIApply), m_strGetSubXML(p_objclsMRIApply_All.m_objclsMRIApply_MRRoomArr), m_strGetOperationDateXML(p_objclsMRIApply_All));
                }
                else
                {
                    lngRes = m_objServ.m_lngModify(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, m_strGetMainXML(p_objclsMRIApply_All.m_objclsMRIApply), m_strGetSubXML(p_objclsMRIApply_All.m_objclsMRIApply_MRRoomArr), m_strGetOperationDateXML(p_objclsMRIApply_All));
                }
            }
            finally
            {
                //m_objServ.Dispose();
            }
            return(lngRes);
        }
示例#2
0
        private string[] m_strGetOperationDateXML(clsMRIApply_All p_objclsMRIApply_All)
        {
            if (p_objclsMRIApply_All.m_strOperationHistoryTimeArr == null)
            {
                return(null);
            }
            string[] strXMLArr = new String[p_objclsMRIApply_All.m_strOperationHistoryTimeArr.Length];

            for (int i = 0; i < p_objclsMRIApply_All.m_strOperationHistoryTimeArr.Length; i++)
            {
                m_objXmlMemStream.SetLength(0);

                m_objXmlWriter.WriteStartDocument();
                m_objXmlWriter.WriteStartElement("Model");
                try
                {
                    m_objXmlWriter.WriteAttributeString("INPATIENTID", p_objclsMRIApply_All.m_objclsMRIApply.m_strInPatientID);
                    m_objXmlWriter.WriteAttributeString("INPATIENTDATE", p_objclsMRIApply_All.m_objclsMRIApply.m_strInPatientDate);
                    m_objXmlWriter.WriteAttributeString("CREATEDATE", p_objclsMRIApply_All.m_objclsMRIApply.m_strCreateDate);
                    m_objXmlWriter.WriteAttributeString("MODIFYDATE", p_objclsMRIApply_All.m_objclsMRIApply.m_strModifyDate);

                    m_objXmlWriter.WriteAttributeString("OPERATIONHISTORYTIME", p_objclsMRIApply_All.m_strOperationHistoryTimeArr[i]);
                }
                catch (Exception ex)
                {
                    clsPublicFunction.ShowInformationMessageBox(ex.Message);
                }
                //不存在此字段,m_objXmlWriter.WriteAttributeString("STATUS", "0");
                m_objXmlWriter.WriteEndElement();
                m_objXmlWriter.WriteEndDocument();
                m_objXmlWriter.Flush();

                strXMLArr[i] = System.Text.Encoding.Unicode.GetString(m_objXmlMemStream.ToArray(), 39 * 2, (int)m_objXmlMemStream.Length - 39 * 2);
            }
            return(strXMLArr);
        }
示例#3
0
        ///查出时间对应的所有信息
        public clsMRIApply_All m_objGetMRIApply_All(string p_strInPatientID, string p_strInPatientDate, string p_strCreateDate)
        {
            string          strXML             = "";
            int             intRows            = 0;
            string          strSubXML          = "";
            int             intSubRows         = 0;
            string          strSub2XML         = "";
            int             intSub2Rows        = 0;
            clsMRIApply_All objclsMRIApply_All = null;

            clsMRIApplyServ m_objServ =
                (clsMRIApplyServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMRIApplyServ));

            try
            {
                long lngResult = m_objServ.m_lngGetMRIApply_All(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strInPatientID, p_strInPatientDate, p_strCreateDate, out strXML, out intRows, out strSubXML, out intSubRows, out strSub2XML, out intSub2Rows);
                if (intRows == 1)
                {
                    objclsMRIApply_All = new clsMRIApply_All();
                    objclsMRIApply_All.m_objclsMRIApply             = new clsMRIApply();
                    objclsMRIApply_All.m_objclsMRIApply_MRRoomArr   = new clsMRIApply_MRRoom[intSubRows];
                    objclsMRIApply_All.m_strOperationHistoryTimeArr = new string[intSub2Rows];

                    XmlTextReader objReader = new XmlTextReader(strXML, XmlNodeType.Element, m_objXmlParser);
                    objReader.WhitespaceHandling = WhitespaceHandling.None;

                    while (objReader.Read())
                    {
                        switch (objReader.NodeType)
                        {
                        case XmlNodeType.Element:
                            if (objReader.HasAttributes)
                            {
                                objclsMRIApply_All.m_objclsMRIApply.m_strInPatientID    = p_strInPatientID;
                                objclsMRIApply_All.m_objclsMRIApply.m_strInPatientDate  = p_strInPatientDate;
                                objclsMRIApply_All.m_objclsMRIApply.m_strCreateDate     = p_strCreateDate;
                                objclsMRIApply_All.m_objclsMRIApply.m_strModifyDate     = objReader.GetAttribute("MODIFYDATE");
                                objclsMRIApply_All.m_objclsMRIApply.m_strCreateUserID   = objReader.GetAttribute("CREATEUSERID");
                                objclsMRIApply_All.m_objclsMRIApply.m_strCreateUserName = objReader.GetAttribute("CREATEUSERNAME");  //
                                objclsMRIApply_All.m_objclsMRIApply.m_strApplyDeptID    = objReader.GetAttribute("APPLYDEPTID");
                                objclsMRIApply_All.m_objclsMRIApply.m_strApplyDeptName  = objReader.GetAttribute("APPLYDEPTNAME");   //
                                objclsMRIApply_All.m_objclsMRIApply.m_strCheckPrice     = objReader.GetAttribute("CHECKPRICE").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strMR_ID          = objReader.GetAttribute("MR_ID").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strSicknessHistoryAndBodyCharacter = objReader.GetAttribute("SICKHISTANDBODYCHARACTER").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strOtherCheckResultAndRegisterID   = objReader.GetAttribute("OTHERCHECKRESULTANDREGISTERID").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strClinicDiagnose        = objReader.GetAttribute("CLINICDIAGNOSE").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strCheckPart             = objReader.GetAttribute("CHECKPART").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strHasOperationHistory   = objReader.GetAttribute("HASOPERATIONHISTORY").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strHasMetalInBodyAndPart = objReader.GetAttribute("HASMETALINBODYANDPART").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strMakeShadowQty         = objReader.GetAttribute("MAKESHADOWQTY").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strPatientReactionInScan = objReader.GetAttribute("PATIENTREACTIONINSCAN").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strScanTime           = objReader.GetAttribute("SCANTIME").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply.m_strTechnicianSignID   = objReader.GetAttribute("TECHNICIANSIGNID");
                                objclsMRIApply_All.m_objclsMRIApply.m_strTechnicianSignName = objReader.GetAttribute("TECHNICIANSIGNNAME");    //
                                objclsMRIApply_All.m_objclsMRIApply.m_strWeight             = objReader.GetAttribute("WEITHT");
                            }
                            break;
                        }
                    }


                    objReader = new XmlTextReader(strSubXML, XmlNodeType.Element, m_objXmlParser);
                    objReader.WhitespaceHandling = WhitespaceHandling.None;

                    int intIndex = 0;
                    while (objReader.Read())
                    {
                        switch (objReader.NodeType)
                        {
                        case XmlNodeType.Element:
                            if (objReader.HasAttributes)
                            {
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex] = new clsMRIApply_MRRoom();
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strInPatientID   = p_strInPatientID;
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strInPatientDate = p_strInPatientDate;
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strCreateDate    = p_strCreateDate;
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strModifyDate    = objReader.GetAttribute("MODIFYDATE");
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strSerialNO      = objReader.GetAttribute("SERIALNO");
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strPartAndLine   = objReader.GetAttribute("PARTANDLINE").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strPulseSerial   = objReader.GetAttribute("PULSESERIAL").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strParam         = objReader.GetAttribute("PARAM").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strFix           = objReader.GetAttribute("FIX").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strLayerNum      = objReader.GetAttribute("LAYERNUM").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strLayerHeight   = objReader.GetAttribute("LAYERHEIGHT").Replace('き', '\'');
                                objclsMRIApply_All.m_objclsMRIApply_MRRoomArr[intIndex].m_strLayerDistance = objReader.GetAttribute("LAYERDISTANCE").Replace('き', '\'');
                                intIndex++;
                            }
                            break;
                        }
                    }


                    objReader = new XmlTextReader(strSub2XML, XmlNodeType.Element, m_objXmlParser);
                    objReader.WhitespaceHandling = WhitespaceHandling.None;

                    intIndex = 0;
                    while (objReader.Read())
                    {
                        switch (objReader.NodeType)
                        {
                        case XmlNodeType.Element:
                            if (objReader.HasAttributes)
                            {
                                //objclsMRIApply_All.m_strOperationHistoryTimeArr[intIndex]=new string();
                                objclsMRIApply_All.m_strOperationHistoryTimeArr[intIndex] = objReader.GetAttribute("OPERATIONHISTORYTIME");
                                intIndex++;
                            }
                            break;
                        }
                    }
                }
            }
            finally
            {
                //m_objServ.Dispose();
            }

            return(objclsMRIApply_All);
        }