コード例 #1
0
        /// <summary>
        /// 住院病人取消入院(不包括已结算的病人)
        /// </summary>
        public static NcmsResult CanInpatientRegister(PatBaseInfo 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.cancePatientSign(recieveMsg);
                if (retMsg.DES)
                {
                    retMsg.dataContent = NccmFunction.decrypt(retMsg.dataContent, sKey);
                }
                if (retMsg.GZipCompress)
                {
                    retMsg.dataContent = NccmFunction.gZipDeCompress(retMsg.dataContent);
                }
                Type       type   = typeof(NcmsResult);
                NcmsResult result = (NcmsResult)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(retMsg.dataContent, type);
                return(result);
            }
            catch
            {
                throw new Exception(retMsg.errMsg);
            }
        }
コード例 #2
0
        /// <summary>
        /// 取消出院结算
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public bool CancelCharge(System.Collections.Hashtable hashtable)
        {
            string Nccm_NO = hashtable["Nccm_NO"].ToString();

            BudgetFee hisData = new BudgetFee();


            JoinArea joinArea = new JoinArea();

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


            DataClass dataClass = new DataClass();

            dataClass.dataClassName  = "新农合数据";
            dataClass.dataClassValue = "1";

            DataType dataType = new DataType();

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

            OperType operType = new OperType();

            operType.operTypeName  = "取消登记";
            operType.operTypeValue = "7";

            ZyPatBaseData patBaseData = new ZyPatBaseData();

            patBaseData.hisID       = zyPatlist.Nccm_NO;//zyPatlist.CureNo + zyPatlist.PatListID.ToString();
            patBaseData.area_id     = JOIN_AREA_CODE;
            patBaseData.person_code = zyPatlist.patientInfo.PatCode;
            patBaseData.name        = zyPatlist.patientInfo.PatName;
            patBaseData.idCard      = zyPatlist.patientInfo.PatNumber; //?
            patBaseData.medcard_id  = zyPatlist.patientInfo.MediCard;  //?
            patBaseData.visit_type  = "2";
            patBaseData.medorg_code = MED_ORG_CODE;

            patBaseData.his_billno = Nccm_NO;

            hisData.uploadPerson = ((HospitalInfo)hospitalInfo).userCode;

            hisData.joinArea  = joinArea;
            hisData.dataClass = dataClass;
            hisData.dataType  = dataType;
            hisData.operType  = operType;
            hisData.zyPat     = patBaseData;
            hisData.uploadorg = MED_ORG_CODE;
            NcmsResult retMsg = NccmInterfaces.CanOutPatZYCharge(hisData);

            if (retMsg.resultId)
            {
                return(true);
            }
            else
            {
                throw new Exception("农合接口调用失败:" + retMsg.resultString);
            }
        }
コード例 #3
0
        /// <summary>
        /// 取消出院结算(中途结算)
        /// </summary>
        public static NcmsResult CanOutPatZYCharge(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.canceInPatientComp(recieveMsg);
                if (retMsg.DES)
                {
                    retMsg.dataContent = NccmFunction.decrypt(retMsg.dataContent, sKey);
                }
                if (retMsg.GZipCompress)
                {
                    retMsg.dataContent = NccmFunction.gZipDeCompress(retMsg.dataContent);
                }
                Type       type   = typeof(NcmsResult);
                NcmsResult result = (NcmsResult)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(retMsg.dataContent, type);
                return(result);
            }
            catch (Exception err)
            {
                throw err;
            }
        }
コード例 #4
0
        /// <summary>
        /// 取消入院
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public bool CancelRegister(System.Collections.Hashtable hashtable)
        {
            PatBaseInfo hisData = new PatBaseInfo();


            JoinArea joinArea = new JoinArea();

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


            DataClass dataClass = new DataClass();

            dataClass.dataClassName  = "新农合数据";
            dataClass.dataClassValue = "1";

            DataType dataType = new DataType();

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

            OperType operType = new OperType();

            operType.operTypeName  = "取消登记";
            operType.operTypeValue = "7";

            PatBaseData patBaseData = new PatBaseData();

            patBaseData.hisID       = zyPatlist.Nccm_NO;//病人的唯一ID,住院则对应的是住院号,门诊则对应的是门诊号
            patBaseData.area_id     = JOIN_AREA_CODE;
            patBaseData.person_code = zyPatlist.patientInfo.PatCode;
            patBaseData.name        = zyPatlist.patientInfo.PatName;
            patBaseData.idCard      = zyPatlist.patientInfo.PatNumber; //?(身份证)
            patBaseData.medcard_id  = zyPatlist.patientInfo.MediCard;  //?
            patBaseData.visit_type  = "2";                             //住院

            hisData.joinArea  = joinArea;
            hisData.dataClass = dataClass;
            hisData.dataType  = dataType;
            hisData.operType  = operType;
            hisData.baseData  = patBaseData;
            hisData.uploadorg = MED_ORG_CODE;
            NcmsResult retMsg = NccmInterfaces.CanInpatientRegister(hisData);

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