Пример #1
0
        public string SaveConsultationInfo()
        {
            return(base.ExecuteActionJsonResult("会诊单信息保存", () =>
            {
                CD_Consultation entity = base.GetPageData <CD_Consultation>(0);
                if (!string.IsNullOrWhiteSpace(entity.InpatientId))
                {
                    CD_Inpatient inpatient = EntityOperate <CD_Inpatient> .GetEntityById(Request["InpatientId"], "InpatientId");
                    if (string.IsNullOrWhiteSpace(entity.ConsultationId) || entity.ConsultationId == "null")
                    {
                        entity.ConsultationState = "1";
                        entity.DeptId = inpatient.CurrentDeptID;
                        entity.WardId = inpatient.CurrentWardID;
                        entity.RequesterCode = UserTokenManager.GetUserToken(Request["token"]).UserId;
                        GI_UserInfo user = EntityOperate <GI_UserInfo> .GetEntityById(entity.RequesterCode, "USERID");
                        entity.RequestDepartCode = user.DpetID;
                        entity.OrganID = UserTokenManager.GetUserToken(Request["token"]).ORGANID;
                    }

                    entity.Del = 0;
                    service.SaveInfo(entity);
                    msgHub hub = new msgHub();
                    // hub.SendGroup(entity.ApplyDepartCode, "Con", "",  "");
                }
                return new WebApi_Result();
            }));
        }