コード例 #1
0
        public ActionResult SavePatientCharge(M_PatientCharge info)
        {
            info.ChargePerson = UserOperateContext.Current.Session_UsrInfo.Name;
            info.IFArrearage  = false;

            if (new M_PatientChargeBLL().Add(info) > 0)
            {
                return(Json(new { Result = "OK", Message = "收费信息记录成功!" }, "text/plain;charset=UTF-8", JsonRequestBehavior.AllowGet));
            }
            //return this.JsonResult(Utility.E_JsonResult.OK, "收费信息记录成功!", null, null);
            else
            {
                return(Json(new { Result = "Error", Message = "收费信息记录失败!" }, "text/plain;charset=UTF-8", JsonRequestBehavior.AllowGet));
            }
            //return this.JsonResult(Utility.E_JsonResult.Error, "收费信息记录失败!", null, null);
        }
コード例 #2
0
        public ActionResult SavePatientCharge()
        {
            string          chargeStr = Request.Form["charge"].ToString();
            M_PatientCharge charge    = JsonHelper.GetJsonInfoBy <M_PatientCharge>(chargeStr);

            if (charge == null)
            {
                return(Json(new { result = "ERROR", msg = "解析实体为空!" }, "appliction/json", JsonRequestBehavior.AllowGet));
            }

            M_PatientCharge info = new M_PatientChargeBLL().GetListBy(pc => pc.TaskCode.Equals(charge.TaskCode) && pc.PatientOrder == 1).FirstOrDefault();

            if (info != null)
            {
                if (new M_PatientChargeBLL().Del(info) <= 0)  // 删除旧收费信息
                {
                    return(Json(new { result = "ERROR", msg = "删除旧收费信息失败!" }, "appliction/json", JsonRequestBehavior.AllowGet));
                }
            }

            //查询是否已经填写病历
            M_PatientRecord prinfo = new M_PatientRecordBLL().GetListBy(pr => pr.TaskCode.Equals(charge.TaskCode) && pr.PatientOrder == 1).FirstOrDefault();

            if (prinfo == null)
            {
                M_PatientRecordBLL                   bll    = new M_PatientRecordBLL();
                M_PatientRecord                      pinfo  = null; //病历主表信息
                M_PatientRecordAppend                pra    = null; //病历附表
                M_PatientRecordCPR                   prCPR  = null; //病历附表--心肺复苏
                List <M_PatientRecordDiag>           prDiag = null; //病历子表--初步印象
                List <M_PatientRecordECGImpressions> prECG  = null; //病历子表--心电图印象
                GetPatientRecordInfo(charge.TaskCode, charge.ChargePerson, out pinfo, out pra, out prCPR);
                bll.Insert(pinfo, pra, prCPR, prDiag, prECG);       //新增病历主表、附表、子表
            }

            charge.PatientOrder = 1;  //收费序号目前永远为1
            if (new M_PatientChargeBLL().Add(charge) > 0)
            {
                return(Json(new { result = "OK", msg = "收费成功!" }, "appliction/json", JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { result = "ERROR", msg = "收费失败!" }, "appliction/json", JsonRequestBehavior.AllowGet));
            }
        }
コード例 #3
0
        public ActionResult EditPatientCharge(M_PatientCharge info)
        {
            info.ChargePerson = UserOperateContext.Current.Session_UsrInfo.Name;
            info.IFArrearage  = false;
            int res = new M_PatientChargeBLL().Modify(info, "Date", "InvoiceNumber", "PatientName", "AddressStart", "AddressEnd", "OutStationRoadCode", "PointRoadCode", "ArriveHospitalRoadCode", "ReturnStationRoadCode", "OneWayKM",
                                                      "ChargeKM", "CarFee", "WaitingFee", "EmergencyFee", "DrugFeeTotal", "ExamineFeeTotal", "ConsumableFeeTotal", "MeasureFeeTotal", "ReceivableTotal", "PaidMoney", "ChargePerson", "IFArrearage", "TaskSD");

            if (res > 0)
            {
                return(Json(new { Result = "OK", Message = "收费信息记录成功!" }, "text/plain;charset=UTF-8", JsonRequestBehavior.AllowGet));
            }
            //return this.JsonResult(Utility.E_JsonResult.OK, "收费信息记录成功!", null, null);
            else
            {
                return(Json(new { Result = "Error", Message = "收费信息记录失败!" }, "text/plain;charset=UTF-8", JsonRequestBehavior.AllowGet));
            }
            // return this.JsonResult(Utility.E_JsonResult.Error, "收费信息记录失败!", null, null);
        }