/// <summary>
        ///
        /// </summary>
        /// <param name="p_objInfo"></param>
        /// <returns>
        /// 操作结果。

        /// 0,失败。

        /// 1,成功。

        /// </returns>
        public long m_lngAddNew(clsThreeMeasureRecordInfo p_objInfo, clsThreeMeasureRecordContentInfo p_objContentInfo, clsThreeMeasureRecordContentAccessInfo[] p_objContentAccessInfoArr, clsThreeMeasureRecordContentEventInfo [] p_objContentEventInfoArr, bool p_blnIsAddNew)
        {
            clsThreeMeasureRecordService m_objThreeMeasureRecordServ =
                (clsThreeMeasureRecordService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsThreeMeasureRecordService));

            long lngRes = 0;

            try
            {
                string    strMainXml             = m_strMakeNewMainXml(p_objInfo);
                string    strContentXml          = m_strMakeNewContentXml(p_objContentInfo);
                string [] strContentAccessXmlArr = m_strMakeNewContentAccessXmlArr(p_objContentAccessInfoArr);
                string [] strContentEventXmlArr  = m_strMakeNewContentEventXmlArr(p_objContentEventInfoArr);
                lngRes = m_objThreeMeasureRecordServ.m_lngAddNew(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, strMainXml, strContentXml, strContentAccessXmlArr, strContentEventXmlArr, p_blnIsAddNew);
            }
            catch (Exception ex)
            {
                string strErrow = ex.Message;
            }
            finally
            {
                //m_objThreeMeasureRecordServ.Dispose();
            }
            return(lngRes);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objInfo"></param>
        /// <returns>生成的XML</returns>
        private string m_strMakeNewContentXml(clsThreeMeasureRecordContentInfo p_objInfo)
        {
            m_objXmlMemStream.SetLength(0);

            m_objXmlWriter.WriteStartDocument();
            m_objXmlWriter.WriteStartElement("ThreeMeasureRecordContent");

            m_objXmlWriter.WriteAttributeString("INPATIENTID", p_objInfo.m_strInPatientID);
            m_objXmlWriter.WriteAttributeString("INPATIENTDATE", p_objInfo.m_strInPatientDate);
            m_objXmlWriter.WriteAttributeString("OPENDATE", p_objInfo.m_strOpenDate);
            m_objXmlWriter.WriteAttributeString("MODIFYDATE", p_objInfo.m_strModifyDate);
            m_objXmlWriter.WriteAttributeString("MODIFYUSERID", p_objInfo.m_strModifyUserID);
            if (p_objInfo.m_strSpecialDateIsNew != null)
            {
                m_objXmlWriter.WriteAttributeString("SPECIALDATEISNEW", p_objInfo.m_strSpecialDateIsNew);
            }
            if (p_objInfo.m_strInputStreamValue != null)
            {
                m_objXmlWriter.WriteAttributeString("INPUTSTREAMVALUE", p_objInfo.m_strInputStreamValue);
            }
            if (p_objInfo.m_strDejectaNeedWeight != null)
            {
                m_objXmlWriter.WriteAttributeString("DEJECTANEEDWEIGHT", p_objInfo.m_strDejectaNeedWeight);
                m_objXmlWriter.WriteAttributeString("DEJECTABEFORETIMES", p_objInfo.m_strDejectaBeforeTimes);
                m_objXmlWriter.WriteAttributeString("DEJECTAAFTERMORETIMES", p_objInfo.m_strDejectaAfterMoreTimes);
                m_objXmlWriter.WriteAttributeString("DEJECTAAFTERTIMES", p_objInfo.m_strDejectaAfterTimes);
                m_objXmlWriter.WriteAttributeString("DEJECTACLYSISTIMES", p_objInfo.m_strDejectaClysisTimes);
                m_objXmlWriter.WriteAttributeString("DEJECTAWEIGHT", p_objInfo.m_strDejectaWeight);
                m_objXmlWriter.WriteAttributeString("CANDEJECTA", p_objInfo.m_strCanDejecta);
            }
            if (p_objInfo.m_strPeeIsIrretention != null)
            {
                m_objXmlWriter.WriteAttributeString("PEEISIRRETENTION", p_objInfo.m_strPeeIsIrretention);
                m_objXmlWriter.WriteAttributeString("PEEVALUE", p_objInfo.m_strPeeValue);
            }
            if (p_objInfo.m_strOutStreamValue != null)
            {
                m_objXmlWriter.WriteAttributeString("OUTSTREAMVALUE", p_objInfo.m_strOutStreamValue);
            }
            if (p_objInfo.m_strDiastolicValue1 != null)
            {
                m_objXmlWriter.WriteAttributeString("DIASTOLICVALUE", p_objInfo.m_strDiastolicValue1);
                m_objXmlWriter.WriteAttributeString("SYSTOLICVALUE", p_objInfo.m_strSystolicValue1);
            }
            if (p_objInfo.m_strDiastolicValue2 != null)
            {
                m_objXmlWriter.WriteAttributeString("DIASTOLICVALUE2", p_objInfo.m_strDiastolicValue2);
                m_objXmlWriter.WriteAttributeString("SYSTOLICVALUE2", p_objInfo.m_strSystolicValue2);
            }
            if (p_objInfo.m_strWeightType != null)
            {
                m_objXmlWriter.WriteAttributeString("WEIGHTTYPE", p_objInfo.m_strWeightType);
                m_objXmlWriter.WriteAttributeString("WEIGHTVALUE", p_objInfo.m_strWeightValue);
            }

            m_objXmlWriter.WriteEndElement();
            m_objXmlWriter.WriteEndDocument();

            m_objXmlWriter.Flush();

            return(System.Text.Encoding.Unicode.GetString(m_objXmlMemStream.ToArray(), 39 * 2, (int)m_objXmlMemStream.Length - 39 * 2));
        }