Example #1
0
 // GET api/<controller>/5
 public md_docter Get(int id)
 {
     #region Bll
     Base_Bll bll = new Base_Bll();
     return bll.GetInfo<md_docter>(id);
     #endregion
 }
Example #2
0
        public JsonResult Cashdraws(int? pageIndex = 1)
        {
            Base_Bll bll = new Base_Bll();
            var info = bll.GetInfo<md_cashdraw_app>(1);

            if (pageIndex <= 1)
                pageIndex = 1;
            //状态
            List<SelectListItem> status = (Share.EnumOperate.ToKeyValues(typeof(CashdrawStatus))
                .Select(t => new SelectListItem() { Value = t.Key.ToString(), Text = t.Value, Selected = t.Key == 0 })).ToList();
            ViewBag.status = status;

            string error = string.Empty;
            int record = 0;
            List<md_cashdraw_app> resultlist = new md_cashdraw_app_Bll().SearchCashdrawList(1, null, null, null, null, null, 0, null, null, pageIndex.Value, 2, out record, out error);
            if (resultlist != null)
            {
                PagingResponse<md_cashdraw_app> pagingResponse = new PagingResponse<md_cashdraw_app>();
                pagingResponse.TotalRecord = record;
                pagingResponse.ResultList = resultlist;
                var jsonResult = Json(pagingResponse, JsonRequestBehavior.AllowGet);
                return jsonResult;
            }
            return null;
        }
Example #3
0
        public ResponseMessage Post([FromBody]md_docter value)
        {
            Model.ResponseMessage result = new ResponseMessage();
            try
            {
                string error = string.Empty;
                Base_Bll bll = new Base_Bll();
                md_docter info = bll.GetInfo<md_docter>(DoctorID);
                string encryptKey = string.Empty;
                var password = BaseTool.EncryptDES(value.oldpwd, encryptKey);

                if (info.login_pwd == password)
                {
                    var newpassword = BaseTool.EncryptDES(value.login_pwd, encryptKey);
                    info.login_pwd = newpassword;
                    info = new md_docter_Bll().UpdateDocter(info, out error);

                    if (string.IsNullOrEmpty(error))
                    {
                        result.bSuccess = true;
                        result.Message = "修改成功";
                    }
                    else
                    {
                        result.bSuccess = false;
                        result.Message = error;
                    }
                }
            }
            catch(Exception ex)
            {
                result.bSuccess=false;
            }
            return result;
        }
Example #4
0
 // GET api/<controller>/5
 public dr_addvisit Get(int id)
 {
     #region Bll
     Base_Bll bll = new Base_Bll();
     return bll.GetInfo<dr_addvisit>(id);
     #endregion
 }
Example #5
0
 // GET api/<controller>/5
 public patient_info Get(int id)
 {
     #region Bll
     Base_Bll bll = new Base_Bll();
     return bll.GetInfo<patient_info>(id);
     #endregion
 }
Example #6
0
 // GET api/<controller>/5
 public promotion_events Get(int id)
 {
     #region Bll
     Base_Bll bll = new Base_Bll();
     return bll.GetInfo<promotion_events>(id);
     #endregion
 }
        /// <summary>
        /// 查询单个诊断相关信息
        /// </summary>
        /// <param name="rcdid"></param>
        /// <returns></returns>
        public patient_medical_rcd Get(int rcdid)
        {
            Base_Bll bll = new Base_Bll();
            patient_medical_rcd info = bll.GetInfo<patient_medical_rcd>(rcdid);

            bll.GetFor(info, t => new { t.patient_name, t.gender, t.birth, t.hospital_name, t.doctor_name });
            if (info.birth.Year != Share.BaseTool.MiniDate.Year)
            {
                int age = DateTime.Now.Year - info.birth.Year;
                if (DateTime.Now < info.birth.AddYears(age)) age--;
                info.patient_age = age;
            }
            patient_address address = new patient_info_Bll().GetDefaultPatientAddressByPatientId(info.patient_id);
            info.address = address.contact_add;

            return info;
        }
        /// <summary>
        /// 查询处方详细信息及处方列表信息
        /// </summary>
        /// <param name="recipeId"></param>
        /// <returns></returns>
        public patient_recipelist Get(int recipeId)
        {
            Base_Bll bll = new Base_Bll();
            patient_recipelist info = bll.GetInfo<patient_recipelist>(recipeId);
            bll.GetFor(info, t => new { t.patient_name,t.gender,t.birth,t.alllergic_his });

            List<patient_recipelist_druguse> druguselist = new patient_recipelist_Bll().GetRecipeDrugListByReciptID(recipeId);
            bll.GetFor(druguselist, t => new { t.commonname, t.standard });

            info.druguselist = druguselist;

            if (info.birth.Year != Share.BaseTool.MiniDate.Year)
            {
                int age = DateTime.Now.Year - info.birth.Year;
                if (DateTime.Now < info.birth.AddYears(age)) age--;
                info.patient_age = age;
            }
            patient_address address = new patient_info_Bll().GetDefaultPatientAddressByPatientId(info.patient_id);
            info.address = address.contact_add;
            return info;
        }
        public ActionResult CreatePatientMessageRcd(FormCollection collection)
        {
            var content = collection["content"];
            int msid = 0;
            patient_message_rcd info = new patient_message_rcd();
            info.Initial();

            Base_Bll bll = new Base_Bll();
            var message=bll.GetInfo<patient_message>(msid);

            info.msg_id = message.pkid;
            info.rcd_contents = content;
            info.createuser = string.Empty;//回复人:助理/医生名字

            string error = string.Empty;
            new patient_message_Bll().CreateMessageRcd(info,out error);
            if(!string.IsNullOrEmpty(error))
            {
                ViewBag.ErrorMessage = "回复失败";
            }
            return View(info);
        }
Example #10
0
        // PUT api/< >/5
        public ResponseMessage Put(int id, [FromBody]md_docter value)
        {
            Model.ResponseMessage result = new ResponseMessage();
            string error = string.Empty;

            Base_Bll bll = new Base_Bll();
            var info = bll.GetInfo<md_docter>(DoctorID);
            info.login_pwd=value.oldpwd;
            md_docter_Bll docbll = new md_docter_Bll();
            docbll.UpdateDocter(info, out error);
            if (string.IsNullOrEmpty(error))
            {
                result.bSuccess = true;
                result.Message = "修改成功";
            }
            else
            {
                result.bSuccess = false;
                result.Message = error;
            }

            return result;
        }
Example #11
0
 // GET api/<controller>/5
 public patient_druguse_suggest Get(int id)
 {
     Base_Bll bll = new Base_Bll();
     patient_druguse_suggest info = bll.GetInfo<patient_druguse_suggest>(id);
     return info;
 }
Example #12
0
 // GET api/<controller>/5
 public patient_medical_rcd Get(int id,bool flag)
 {
     Base_Bll bll = new Base_Bll();
     patient_medical_rcd info = bll.GetInfo<patient_medical_rcd>(id);
     return info;
 }
Example #13
0
        public JsonResult PostSearchPromotionList(string name, DateTime? date1, DateTime? date2, int? pageIndex = 1)
        {
            if (pageIndex <= 1)
                pageIndex = 1;

            string error = string.Empty;
            int record = 0;
            Base_Bll bll = new Base_Bll();
            var events = bll.GetInfo<promotion_events>(BaseTool.GetIntNumber(name));
            if (events != null)
            {
                name = events.name;
            }

            List<promotion_events> resultlist = new promotion_events_Bll().GetPromotionEventList(name, 0, 0, date1, date2, null, null,
             null, null, null, null, pageIndex.Value, 20, out record, out error);
            if (resultlist != null)
            {
                foreach (var item in resultlist)
                {
                    item.eventtypestr = Enum.GetName(typeof(Model.ConfigClass.PromotionEventType), item.pkid);
                }
                PagingResponse<promotion_events> pagingResponse = new PagingResponse<promotion_events>();
                pagingResponse.TotalRecord = record;
                pagingResponse.ResultList = resultlist;
                var jsonResult = Json(pagingResponse, JsonRequestBehavior.AllowGet);
                return jsonResult;
            }
            return null;
        }