public ServiceResponseData RefundFee() { try { List <Prescription> prescriptions = requestData.GetData <List <Prescription> >(0); //退费处方 int operatoreid = requestData.GetData <int>(1); //操作员ID int costheadId = requestData.GetData <int>(2); //结算ID string refundInvoiceNO = requestData.GetData <string>(3); //退费票据号 string balanceType = NewObject <CommonMethod>().GetOpConfig(OpConfigConstant.BalanceType); OP_Enum.BalanceType chargeType = (OP_Enum.BalanceType)Convert.ToInt32(balanceType); BaseBalaceProcess balanceProcess = NewObject <BalanceFactory>().CreateChargeObject(chargeType); List <Prescription> balancePresc = balanceProcess.RefundFee(costheadId, operatoreid, prescriptions, refundInvoiceNO); bool isAllRefund = true; if (balancePresc.Count > 0) { isAllRefund = false; } responseData.AddData(isAllRefund); //是否全退 responseData.AddData(balancePresc); //需要补收的处方 return(responseData); } catch (Exception err) { throw new Exception(err.Message); } }
public ServiceResponseData BudgeBalance() { try { List <Prescription> prescriptions = requestData.GetData <List <Prescription> >(0); //预算处方 int operatorid = requestData.GetData <int>(1); //操作员ID OP_PatList curPatlist = requestData.GetData <OP_PatList>(2); //当前病人对象 int costPatTypeid = requestData.GetData <int>(3); //结算病人类型 List <int> budgePresNum = requestData.GetData <List <int> >(4); //选中的处方张数 string balanceType = NewObject <CommonMethod>().GetOpConfig(OpConfigConstant.BalanceType); //结算方式 OP_Enum.BalanceType chargeType = (OP_Enum.BalanceType)Convert.ToInt32(balanceType); BaseBalaceProcess balanceProcess = NewObject <BalanceFactory>().CreateChargeObject(chargeType); balanceProcess.BaseBalaceProcessInit(curPatlist, operatorid, chargeType, budgePresNum, costPatTypeid); //初始化 List <ChargeInfo> listChargeInfo = balanceProcess.Budget(prescriptions); //处方预算 responseData.AddData(listChargeInfo); bool isMedicarePat = NewObject <CommonMethod>().IsMedicarePat(costPatTypeid);//判断是否是医保病人 responseData.AddData(isMedicarePat); return(responseData); } catch (Exception err) { throw new Exception(err.Message); } }
/// <summary> /// 收费基类 /// </summary> /// <param name="patient">病人对象</param> /// <param name="operatorId">操作员ID</param> /// <param name="chargeType">结算类型</param> /// <param name="budgeGroupID">预算处方的groupid</param> /// <param name="costTypeid">结算病人类型</param> public void BaseBalaceProcessInit(OP_PatList patient, int operatorId, OP_Enum.BalanceType chargeType, List <int> budgeGroupID, int costTypeid) { curPatient = patient; this.operatorId = operatorId; this.chargeType = chargeType; this.budgeGroupID = budgeGroupID; costtypeid = costTypeid; }
/// <summary> /// 根据结算类型实例化类 /// </summary> /// <param name="chargeType">结算类型</param> /// <returns>结算处理对象</returns> public BaseBalaceProcess CreateChargeObject(OP_Enum.BalanceType chargeType) { if (chargeType == OP_Enum.BalanceType.一次结算一张票号) { return(NewObject <BalanceProcess>()); } else { return(NewObject <BalanceProcessOne>()); } }
public ServiceResponseData AbortBudget() { try { List <ChargeInfo> budgeInfo = requestData.GetData <List <ChargeInfo> >(0);//金额预算信息 string balanceType = NewObject <CommonMethod>().GetOpConfig(OpConfigConstant.BalanceType); OP_Enum.BalanceType chargeType = (OP_Enum.BalanceType)Convert.ToInt32(balanceType); BaseBalaceProcess balanceProcess = NewObject <BalanceFactory>().CreateChargeObject(chargeType); balanceProcess.AbortBudget(budgeInfo); responseData.AddData(true); return(responseData); } catch (Exception err) { throw new Exception(err.Message); } }
public ServiceResponseData Balance() { try { List <Prescription> prescriptions = requestData.GetData <List <Prescription> >(0); //预算处方 int operatoreid = requestData.GetData <int>(1); //操作员ID OP_PatList curPatlist = requestData.GetData <OP_PatList>(2); //当前病人对象 List <ChargeInfo> budgeInfo = requestData.GetData <List <ChargeInfo> >(3); //金额预算信息 string balanceType = NewObject <CommonMethod>().GetOpConfig(OpConfigConstant.BalanceType); OP_Enum.BalanceType chargeType = (OP_Enum.BalanceType)Convert.ToInt32(balanceType); BaseBalaceProcess balanceProcess = NewObject <BalanceFactory>().CreateChargeObject(chargeType); balanceProcess.Balance(curPatlist, operatoreid, budgeInfo, prescriptions);//处方正式结算 responseData.AddData(budgeInfo); string curInvoiceNO = NewObject <CommonMethod>().GetCurInvoiceNO(InvoiceType.门诊收费, operatoreid); responseData.AddData(curInvoiceNO);//当前可用票据号 //过滤药品数据 List <Prescription> resultUser = prescriptions.FindAll( delegate(Prescription user) { return(user.StatID == 100 || user.StatID == 101 || user.StatID == 102); }); // 根据过滤出的药品数据 过滤出不同的药房 if (resultUser.Count > 0) { // 根据药房生成消息 IEnumerable <IGrouping <string, Prescription> > query = resultUser.GroupBy(x => x.ExecDetpName); foreach (IGrouping <string, Prescription> info in query) { List <Prescription> sl = info.ToList <Prescription>(); // 生成消息 #region "保存业务消息数据 --Add By ZhangZhong" // 保存业务消息数据 Dictionary <string, string> msgDic = new Dictionary <string, string>(); int workId = requestData.GetData <int>(4); int userId = requestData.GetData <int>(5); int deptId = requestData.GetData <int>(6); msgDic.Add("WorkID", workId.ToString()); // 消息机构ID msgDic.Add("SendUserId", userId.ToString()); // 消息生成人ID msgDic.Add("SendDeptId", deptId.ToString()); // 消息生成科室ID msgDic.Add("PatListID", curPatlist.PatListID.ToString()); // 病人ID msgDic.Add("ExecDeptName", sl[0].ExecDetpName); // 病人ID NewObject <BusinessMessage>().GenerateBizMessage(MessageType.门诊新处方, msgDic); #endregion } } //获取发票打印信息 DataTable dtInvoice = NewDao <IOPManageDao>().GetBalancePrintInvoiceDt(budgeInfo[0].CostHeadID); //票据信息 DataTable dtInvoiceDetail = NewDao <IOPManageDao>().GetBalancePrintDetailDt(budgeInfo[0].CostHeadID); //票据详细信息 DataTable dtInvoiceStatDetail = NewDao <IOPManageDao>().GetBalancePrintStatDt(budgeInfo[0].CostHeadID); //项目信息 responseData.AddData(dtInvoice); responseData.AddData(dtInvoiceDetail); responseData.AddData(dtInvoiceStatDetail); return(responseData); } catch (Exception err) { throw new Exception(err.Message); } }