Example #1
0
        public static string CalcDisplayAge(DateTime birthday, DateTime endDate)
        {
            string displayAge;
            int    accAge;

            PatientBasicInfo.CalculateAge(birthday, DateTime.Now, out displayAge, out accAge);
            return(displayAge);
        }
Example #2
0
 public BasicProfileViewModel()
 {
     InfoItemList      = new List <List <InfoItem> >();
     InfoItemSelected  = new List <List <string> >();
     PatientDetailInfo = new List <List <PatientDetailInfo> >();
     Patient           = new PatientBasicInfo();
     VitalSignsFocused = new List <string>();
     DoctorList        = new List <SelectListItem>();
     PatientList       = new List <PatientBasicInfo>();
 }
Example #3
0
        private PatientBasicInfo SearchResponse(PatientBasicInfo patientInfo, string searchType, string searchValue)
        {
            if (patientInfo == null)
            {
                string example = searchType == "Patient Id" ? "(e.g. PATIENT0001)" : "";

                return(GetErrorResponse <PatientBasicInfo>($"{searchType} {searchValue} does not exist. {example}"));
            }

            return(GetSuccessResponse("User found", patientInfo));
        }
Example #4
0
        public PatBasicInfo GetPatBasicInfo(DataConnection pclsCache, string UserId)
        {
            try
            {
                string           module      = "";
                PatBasicInfo     patientInfo = new PatBasicInfo();
                PatientBasicInfo patientList = usersMethod.GetPatientBasicInfo(pclsCache, UserId);
                patientInfo.UserId = UserId;
                if (patientList != null)
                {
                    patientInfo.UserName          = patientList.UserName;
                    patientInfo.Age               = patientList.Age;
                    patientInfo.Gender            = patientList.Gender;
                    patientInfo.BloodType         = patientList.BloodType;
                    patientInfo.InsuranceType     = patientList.InsuranceType;
                    patientInfo.Birthday          = patientList.Birthday;
                    patientInfo.GenderText        = patientList.GenderText;
                    patientInfo.BloodTypeText     = patientList.BloodTypeText;
                    patientInfo.InsuranceTypeText = patientList.InsuranceTypeText;
                    patientInfo.DoctorId          = patientList.DoctorId;
                    patientInfo.IDNo              = patientList.IDNo;
                }

                List <TypeAndName> modules = moduleInfoMethod.PsBasicInfoDetailGetModulesByPID(pclsCache, UserId);
                for (int i = 0; i < modules.Count; i++)
                {
                    module = module + "|" + modules[i].Name;
                }
                if (module != "")
                {
                    module = module.Substring(1, module.Length - 1);
                }
                patientInfo.Module = module;
                return(patientInfo);
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "GetPatBasicInfo", "WebService调用异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(null);

                throw ex;
            }
        }
Example #5
0
        //GetBasicInfo WF 2014-12-2  //WF 20151010
        public PatientBasicInfo GetPatientBasicInfo(DataConnection pclsCache, string UserId)
        {
            PatientBasicInfo ret = new PatientBasicInfo();

            try
            {
                if (!pclsCache.Connect())
                {
                    return(null);
                }
                ret.UserName          = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[0].ToString();
                ret.Age               = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[1].ToString();
                ret.Gender            = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[2].ToString();
                ret.BloodType         = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[3].ToString();
                ret.IDNo              = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[4].ToString();
                ret.DoctorId          = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[5].ToString();
                ret.InsuranceType     = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[6].ToString();
                ret.Birthday          = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[7].ToString();
                ret.GenderText        = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[8].ToString();
                ret.BloodTypeText     = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[9].ToString();
                ret.InsuranceTypeText = Ps.BasicInfo.GetPatientBasicInfo(pclsCache.CacheConnectionObject, UserId)[10].ToString();


                return(ret);
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取名称失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsBasicInfo.GetPatientBasicInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return(null);
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Example #6
0
 /// <summary>
 /// 更改出生日期后,动态计算年龄 //edit by wyt 2012-11-02 更新年龄计算方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void deBirth_EditValueChanged(object sender, EventArgs e)
 {
     this.txtAge.Text = PatientBasicInfo.CalcDisplayAge(deBirth.DateTime, DateTime.Now);
 }
        public ActionResult GetDetailsByUsername(string username)
        {
            PatientBasicInfo patientInfo = postPaymentService.GetPatientDetailByUsername(username);

            return(Json(patientInfo, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetDetailsByPatientId(string patientId)
        {
            PatientBasicInfo patientInfo = postPaymentService.GetPatientDetailById(patientId);

            return(Json(patientInfo, JsonRequestBehavior.AllowGet));
        }
Example #9
0
 public PatientBasicInfoViewModel()
 {
     PatientBasicInfo = new PatientBasicInfo();
 }
Example #10
0
        public PatientBasicInfo GetPatientDetailByUsername(string username)
        {
            PatientBasicInfo patientInfo = postPaymentDao.GetPatientDetailByUsername(username);

            return(SearchResponse(patientInfo, "Username", username));
        }
Example #11
0
        public PatientBasicInfo GetPatientDetailById(string patientId)
        {
            PatientBasicInfo patientInfo = postPaymentDao.GetPatientDetailById(patientId);

            return(SearchResponse(patientInfo, "Patient Id", patientId));
        }