/// <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; } }
/// <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); } }
/// <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); } }
/// <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; }
/// <summary> /// 上传病人费用明细(住院和门诊) /// </summary> /// <param name="hisData"></param> /// <returns></returns> public static FeeDetail[] UploadPatientFeeDetail(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); if (result.resultId) { return(result.feeDetail); } else { throw new Exception(result.resultString); } } catch (Exception err) { throw err; } throw new Exception(""); }