Пример #1
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);
            }
        }
Пример #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>
        private static void temp_trans_fee()
        {
            BudgetFee hisData  = new BudgetFee();
            JoinArea  joinArea = new JoinArea();

            joinArea.code = "430121";
            joinArea.name = "长沙县";

            DataType dataType = new DataType();

            dataType.dataTypeName  = "门诊数据";
            dataType.dataTypeValue = "2";

            ZyPatBaseData zyPat = new ZyPatBaseData();

            zyPat.idCard      = "440100199707010033";
            zyPat.person_code = "430121112001001000101";
            zyPat.hisID       = "200904080001";
            zyPat.area_id     = "430121";
            zyPat.medorg_code = "400866951";

            FeeDetail feeDetail = new FeeDetail();

            feeDetail.his_billno       = "";
            feeDetail.item_sn          = "123523";
            feeDetail.item_code        = "112010702110105";
            feeDetail.item_class       = "1";
            feeDetail.item_equal       = "0";
            feeDetail.item_name        = "青霉素";
            feeDetail.item_use_time    = "2009-4-1";
            feeDetail.amount           = 12.00;
            feeDetail.drugform         = "针剂";
            feeDetail.doctorTitle      = "232";
            feeDetail.doctor           = "刘医生";
            feeDetail.money            = 24.00;
            feeDetail.price            = 2.00;
            feeDetail.center_item_code = "0101010605110201";
            feeDetail.specs            = "1.0g*24支";
            feeDetail.unit             = "支";

            FeeDetail[] detailList = new FeeDetail[1];
            detailList[0]     = feeDetail;
            hisData.zyPat     = zyPat;
            hisData.feeDetail = detailList;
            hisData.uploadorg = "400866951";
            hisData.dataType  = dataType;
            hisData.joinArea  = joinArea;
        }
Пример #4
0
        /// <summary>
        /// 农合入院
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public bool Register(System.Collections.Hashtable hashtable)
        {
            PatientSignInfo retMsg = null;

            PatientSign   ps       = new PatientSign();
            ZyPatBaseData zyPs     = new ZyPatBaseData();
            JoinArea      joinArea = new JoinArea();

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

            zyPs.hisID       = zyPatlist.Nccm_NO;//zyPatlist.CureNo + zyPatlist.PatListID.ToString();
            zyPs.medorg_code = MED_ORG_CODE;
            zyPs.area_id     = JOIN_AREA_CODE;
            zyPs.inpat_no    = zyPatlist.CureNo.ToString();

            zyPs.person_code  = zyPatlist.patientInfo.PatCode;
            zyPs.name         = zyPatlist.patientInfo.PatName;
            zyPs.sex          = zyPatlist.patientInfo.PatSex == "男" ? "1" : "2";
            zyPs.idCard       = zyPatlist.patientInfo.PatNumber;//?
            zyPs.family_code  = zyPatlist.patientInfo.FamilyCode;
            zyPs.medcard_id   = zyPatlist.patientInfo.MediCard;
            zyPs.medorg_level = "2";
            zyPs.visit_type   = "2";
            zyPs.adm_date     = zyPatlist.CureDate.ToString("yyyy-MM-dd");
            zyPs.adm_state    = "1"; //?zyPatlist.CureState?
            zyPs.comp_classs  = "2"; //?

            ps.joinArea  = joinArea;
            ps.zyPat     = zyPs;
            ps.uploadorg = MED_ORG_CODE;
            retMsg       = NccmInterfaces.InpatientRegister(ps);
            if (retMsg.resultId)
            {
                return(retMsg.resultId);
            }
            else
            {
                throw new Exception("农合接口调用失败:" + retMsg.resultString);
            }
        }
Пример #5
0
        /// <summary>
        /// 出院结算
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public object Charge(System.Collections.Hashtable hashtable)
        {
            FeeDetail[] prescriptions = (FeeDetail[])hashtable["FeeDetail"];
            string      Is_midWay     = hashtable["midWay"].ToString();
            string      Nccm_NO       = hashtable["Nccm_NO"].ToString();

            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);//更新为上传标识



            PatientComp patComp = new PatientComp();

            patComp.uploadorg = "1";

            DataClass dataClass = new DataClass();

            dataClass.dataClassValue = "2";//门诊是1,住院是2
            patComp.dataClass        = dataClass;

            JoinArea joinArea = new JoinArea();

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

            DataType dataType = new DataType();

            dataType.dataTypeName  = "门诊数据";
            dataType.dataTypeValue = "2";
            patComp.dataType       = dataType;


            ZyPatBaseData zyPat = new ZyPatBaseData();


            zyPat.area_id     = JOIN_AREA_CODE;
            zyPat.medorg_code = MED_ORG_CODE;
            zyPat.hisID       = zyPatlist.Nccm_NO;//zyPatlist.CureNo + zyPatlist.PatListID.ToString();
            zyPat.his_billno  = Nccm_NO;
            zyPat.person_code = zyPatlist.patientInfo.PatCode;
            zyPat.name        = zyPatlist.patientInfo.PatName;
            zyPat.sex         = zyPatlist.patientInfo.PatSex == "男" ? "1" : "2";

            zyPat.idCard      = zyPatlist.patientInfo.PatNumber;
            zyPat.family_code = zyPatlist.patientInfo.FamilyCode;
            zyPat.medcard_id  = zyPatlist.patientInfo.MediCard;

            zyPat.medorg_level  = ((HospitalInfo)hospitalInfo).hos_level;
            zyPat.is_midway     = Is_midWay;                     //1,中途2出院
            zyPat.visit_type    = "2";
            zyPat.comp_classs   = "2";                           //?
            zyPat.adm_date      = zyPatlist.CureDate.ToString(); //入院日期
            zyPat.status        = zyPatlist.CureState;           //?
            zyPat.maindiag_code = zyPatlist.DiseaseCode;
            zyPat.dis_date      = zyPatlist.OutDate.ToString();

            patComp.zyPat     = zyPat;
            patComp.zyDetail  = prescriptions;
            patComp.uploadorg = MED_ORG_CODE;

            CompResult CR = NccmInterfaces.OutZYPatientCharge(patComp);

            if (CR.resultId)
            {
                prescriptions = CR.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(Convert.ToDecimal(CR.compData[0].comp_money));
            }
            else
            {
                throw new Exception("农合接口调用失败:" + CR.resultString);
            }
        }
Пример #6
0
        /// <summary>
        /// 出院预算
        /// </summary>
        /// <param name="hashtable"></param>
        /// <returns></returns>
        public object PreviewCharge(System.Collections.Hashtable hashtable)
        {
            FeeDetail[] prescriptions = (FeeDetail[])hashtable["FeeDetail"];
            string      Is_midWay     = hashtable["midWay"].ToString();

            PatientComp patComp = new PatientComp();

            patComp.uploadorg = "1";

            DataClass dataClass = new DataClass();

            dataClass.dataClassValue = "2";
            patComp.dataClass        = dataClass;

            JoinArea joinArea = new JoinArea();

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

            DataType dataType = new DataType();

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

            ZyPatBaseData zyPat = new ZyPatBaseData();

            zyPat.hisID       = zyPatlist.Nccm_NO;
            zyPat.area_id     = JOIN_AREA_CODE;
            zyPat.medorg_code = MED_ORG_CODE;

            zyPat.person_code = zyPatlist.patientInfo.PatCode;
            zyPat.name        = zyPatlist.patientInfo.PatName;
            zyPat.sex         = zyPatlist.patientInfo.PatSex == "男" ? "1" : "2";

            zyPat.idCard      = zyPatlist.patientInfo.PatNumber;
            zyPat.family_code = zyPatlist.patientInfo.FamilyCode;
            zyPat.medcard_id  = zyPatlist.patientInfo.MediCard;

            zyPat.medorg_level = ((HospitalInfo)hospitalInfo).hos_level;

            zyPat.visit_type  = "2";
            zyPat.comp_classs = "2";                           //?住院2
            zyPat.adm_date    = zyPatlist.CureDate.ToString(); //入院日期
            zyPat.status      = "1";                           //(未补)//zyPatlist.CureState;//?

            zyPat.maindiag_code = zyPatlist.DiseaseCode;
            zyPat.dis_date      = DateTime.Now.ToString();
            zyPat.is_midway     = "1";//1,中途结算.2,出院结算



            patComp.zyPat = zyPat;


            patComp.zyDetail  = prescriptions;
            patComp.uploadorg = MED_ORG_CODE;
            //调用接口预算功能

            CompResult compresult = NccmInterfaces.OutZYPatientBudegt(patComp);

            if (compresult.resultId)
            {
                return(Convert.ToDecimal(compresult.compData[0].comp_money));
            }
            else
            {
                throw new Exception("农合接口调用失败:" + compresult.resultString);
            }
        }