예제 #1
0
        /// <summary>
        /// 住院病人费用上传
        /// </summary>
        public static RecieveDetailFeeResult UploadZYPatFee(BudgetFee hisData)
        {
            string strParameter = Newtonsoft.Json.JavaScriptConvert.SerializeObject(hisData);

            Message recieveMsg = new Message();

            recieveMsg.DES          = false;
            recieveMsg.GZipCompress = false;
            recieveMsg.dataContent  = strParameter;

            Message retMsg = new Message();

            try
            {
                retMsg = ncmsInterface.recieveDetailFee(recieveMsg);
                if (retMsg.DES)
                {
                    retMsg.dataContent = NccmFunction.decrypt(retMsg.dataContent, sKey);
                }
                if (retMsg.GZipCompress)
                {
                    retMsg.dataContent = NccmFunction.gZipDeCompress(retMsg.dataContent);
                }
                Type type = typeof(RecieveDetailFeeResult);
                RecieveDetailFeeResult result = (RecieveDetailFeeResult)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(retMsg.dataContent, type);
                return(result);
            }
            catch (Exception err)
            {
                throw err;
            }
        }
예제 #2
0
        /// <summary>
        /// 住院病人费用上传
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public bool UploadzyPatFee(System.Collections.Hashtable hashtable)
        {
            FeeDetail[] prescriptions = (FeeDetail[])hashtable["FeeDetail"];

            ZY_PresOrder zypo = new ZY_PresOrder();

            int[] presID = new int[prescriptions.Length];
            for (int i = 0; i < prescriptions.Length; i++)
            {
                presID[i] = Convert.ToInt32(prescriptions[i].item_sn);
            }
            zypo.UpdateComp(presID);//更新为上传标识

            BudgetFee hisData  = new BudgetFee();
            JoinArea  joinArea = new JoinArea();

            joinArea.code = JOIN_AREA_CODE;
            joinArea.name = JOIN_AREA_NAME;

            DataType dataType = new DataType();

            dataType.dataTypeName  = "住院数据";
            dataType.dataTypeValue = "2";

            ZyPatBaseData zyPat = new ZyPatBaseData();

            zyPat.idCard      = zyPatlist.patientInfo.PatNumber;//?
            zyPat.person_code = zyPatlist.patientInfo.PatCode;
            zyPat.hisID       = zyPatlist.Nccm_NO;
            zyPat.area_id     = JOIN_AREA_CODE;
            zyPat.medorg_code = MED_ORG_CODE;//?

            hisData.zyPat     = zyPat;
            hisData.feeDetail = prescriptions;
            hisData.uploadorg = MED_ORG_CODE;//"40086695143010101A2201";//?
            hisData.dataType  = dataType;
            hisData.joinArea  = joinArea;

            RecieveDetailFeeResult result = NccmInterfaces.UploadZYPatFee(hisData);

            if (result.resultId)
            {
                prescriptions = result.feeDetail;
                presID        = new int[prescriptions.Length];

                for (int i = 0; i < prescriptions.Length; i++)
                {
                    presID[i] = Convert.ToInt32(prescriptions[i].item_sn);
                }
                zypo.DelComp(presID);//更新上传失败的项目
                return(true);
            }
            else
            {
                throw new Exception("农合接口调用失败:" + result.resultString);
            }
        }
예제 #3
0
        /// <summary>
        /// 下载病人费用
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public object DownloadzyPatFee(System.Collections.Hashtable hashtable)
        {
            DownLoadItem hisData = new DownLoadItem();

            JoinArea joinArea = new JoinArea();

            joinArea.code = JOIN_AREA_CODE;
            joinArea.name = JOIN_AREA_NAME;

            DataType dataType = new DataType();

            dataType.dataTypeName  = "住院数据";
            dataType.dataTypeValue = "2";


            Condition CARD_ID = new Condition();        //合作医疗证号

            CARD_ID.condition_displayname = "合作医疗证号";
            CARD_ID.condition_name        = "SN";
            CARD_ID.condition_value       = zyPatlist.Nccm_NO; //"20090408" ;
            Condition[] conditions = new Condition[] { CARD_ID };

            hisData.uploadorg  = MED_ORG_CODE;
            hisData.dataType   = dataType;
            hisData.joinArea   = joinArea;
            hisData.conditions = conditions;
            RecieveDetailFeeResult rdf = NccmInterfaces.DownLoadDetailFee(hisData);

            if (rdf.resultId)
            {
                return(ConvertDT(rdf.feeDetail));
            }
            else
            {
                throw new Exception("农合接口调用失败:" + rdf.resultString);
            }
        }