/// <summary> /// 获取人员信息根据输入信息 /// </summary> /// <param name="hisUser"></param> /// <param name="inputContent"></param> /// <returns></returns> public IList <MED_HIS_USERS> GetMedHisUsers(MED_HIS_USERS hisUser, string inputContent) { if (!string.IsNullOrEmpty(inputContent)) { inputContent = inputContent.ToUpper(); } return(dapper.Set <MED_HIS_USERS>().Select(r => new { r.USER_NAME, r.USER_JOB_ID, r.INPUT_CODE }, d => d.USER_DEPT_CODE == hisUser.USER_DEPT_CODE && d.USER_JOB.Contains(hisUser.USER_JOB) && (d.INPUT_CODE.StartsWith(inputContent) || d.USER_NAME.StartsWith(inputContent) || d.USER_JOB_ID == inputContent))); }
/// <summary> /// 根据ID判断是否存在该医生 /// </summary> protected virtual bool ExistsDoctor(string jobID) { if (MED_USERS_DICT != null) { MED_HIS_USERS mhu = MED_DOCTOR_DICT.Where(r => r.USER_JOB_ID == jobID).FirstOrDefault(); if (mhu != null) { return(true); } } return(false); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = string.Empty; if (null != value) { MED_HIS_USERS tempUser = ApplicationModel.Instance.AllDictList.HisUsersList.FirstOrDefault(x => x.USER_JOB_ID.Equals(value.ToString())); if (null != tempUser) { result = tempUser.USER_NAME; } else { result = value.ToString(); } } return(result); }
/// <summary> /// 根据编号获取姓名 /// </summary> /// <param name="userID"></param> /// <returns></returns> public static string IDConvertName(string userID) { string name = userID; if (!string.IsNullOrEmpty(userID)) { MED_HIS_USERS tempUser = null; if (ApplicationModel.Instance.HisUsersCache == null) { ApplicationModel.Instance.HisUsersCache.TryGetValue(userID, out tempUser); } if (tempUser == null) { tempUser = ApplicationModel.Instance.AllDictList.HisUsersList.Where <MED_HIS_USERS>(x => x.USER_JOB_ID.Equals(userID)).FirstOrDefault <MED_HIS_USERS>(); } if (null != tempUser) { name = tempUser.USER_NAME; } } return(name); }
private List <KeyValue> GetFieldNames(string tableName) { List <KeyValue> list = new List <KeyValue>(); DataTable dataTable = new DataTable(); if (tableName.ToUpper().Trim().Equals("MED_OPERATION_MASTER")) { MED_OPERATION_MASTER master = new MED_OPERATION_MASTER(); foreach (string column in master.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_MASTER_EXT")) { MED_OPERATION_MASTER_EXT ext = new MED_OPERATION_MASTER_EXT(); foreach (string column in ext.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PAT_MASTER_INDEX")) { MED_PAT_MASTER_INDEX tmp = new MED_PAT_MASTER_INDEX(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PATS_IN_HOSPITAL")) { MED_PATS_IN_HOSPITAL pats = new MED_PATS_IN_HOSPITAL(); foreach (string column in pats.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_RECOVER")) { MED_ANESTHESIA_RECOVER tmp = new MED_ANESTHESIA_RECOVER(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INQUIRY")) { MED_ANESTHESIA_INQUIRY tmp = new MED_ANESTHESIA_INQUIRY(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_SAFETY_CHECKS")) { MED_SAFETY_CHECKS safety = new MED_SAFETY_CHECKS(); foreach (string column in safety.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PAT_VISIT")) { MED_PAT_VISIT visit = new MED_PAT_VISIT(); foreach (string column in visit.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN")) { MED_ANESTHESIA_PLAN plan = new MED_ANESTHESIA_PLAN(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN_EXAM")) { MED_ANESTHESIA_PLAN_EXAM plan = new MED_ANESTHESIA_PLAN_EXAM(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN_PMH")) { MED_ANESTHESIA_PLAN_PMH plan = new MED_ANESTHESIA_PLAN_PMH(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_HIS_USERS")) { MED_HIS_USERS users = new MED_HIS_USERS(); foreach (string column in users.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_DEPT_DICT")) { MED_DEPT_DICT dept = new MED_DEPT_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_DIAGNOSIS_DICT")) { MED_DIAGNOSIS_DICT dept = new MED_DIAGNOSIS_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_DICT")) { MED_OPERATION_DICT dept = new MED_OPERATION_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_DICT")) { MED_ANESTHESIA_DICT dept = new MED_ANESTHESIA_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATING_ROOM")) { MED_OPERATING_ROOM dept = new MED_OPERATING_ROOM(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PREOPERATIVE_EXPANSION")) { MED_PREOPERATIVE_EXPANSION row = new MED_PREOPERATIVE_EXPANSION(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_EXTENDED")) { MED_OPERATION_EXTENDED row = new MED_OPERATION_EXTENDED(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_POSTOPERATIVE_EXTENDED")) { MED_POSTOPERATIVE_EXTENDED row = new MED_POSTOPERATIVE_EXTENDED(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PACU_SORCE")) { MED_PACU_SORCE row = new MED_PACU_SORCE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_ANALGESIC_MASTER")) { MED_OPERATION_ANALGESIC_MASTER row = new MED_OPERATION_ANALGESIC_MASTER(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_ANALGESIC_MEDICINE")) { MED_OPER_ANALGESIC_MEDICINE row = new MED_OPER_ANALGESIC_MEDICINE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_ANALGESIC_TOTAL")) { MED_OPER_ANALGESIC_TOTAL row = new MED_OPER_ANALGESIC_TOTAL(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_RISK_ESTIMATE")) { MED_OPER_RISK_ESTIMATE row = new MED_OPER_RISK_ESTIMATE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INPUT_DICT")) { MED_ANESTHESIA_INPUT_DICT row = new MED_ANESTHESIA_INPUT_DICT(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INPUT_DATA")) { MED_ANESTHESIA_INPUT_DATA row = new MED_ANESTHESIA_INPUT_DATA(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } if (!string.IsNullOrEmpty(_tableName)) { foreach (DataRow row in dataTable.Rows) { list.Add(new KeyValue(row[_codeField].ToString(), row[_nameField].ToString())); } } else { foreach (DataColumn column in dataTable.Columns) { list.Add(new KeyValue(GetFieldAlias(column.ColumnName), column.ColumnName)); } } return(list); }
public void RefreshCard() { ClearCard(); if (_patCard != null) { CardVisible(true); lbRoomSequence.Text = _patCard.OPER_ROOM_NO; if (!string.IsNullOrEmpty(_patCard.SEQUENCE.ToString())) { lbRoomSequence.Text = _patCard.OPER_ROOM_NO + "-" + Convert.ToInt16(_patCard.SEQUENCE).ToString(); } lbName.Text = _patCard.NAME; if (_patCard.SEX == "男") { pictureBoxSex.Image = Resources.男; } else if (_patCard.SEX == "女") { pictureBoxSex.Image = Resources.女; } string strlbAge = string.Empty; if (!string.IsNullOrEmpty(_patCard.DATE_OF_BIRTH.ToString()) && !string.IsNullOrEmpty(_patCard.SCHEDULED_DATE_TIME.ToString())) { strlbAge = DateDiff.CalAge(_patCard.DATE_OF_BIRTH.Value, _patCard.SCHEDULED_DATE_TIME.Value); } lbAgeInpNo.Text = strlbAge; if (_patCard.OPER_STATUS_CODE < 5)//术前 { this.BackgroundImage = Resources.card_术前; } else if (_patCard.OPER_STATUS_CODE >= 5 && _patCard.OPER_STATUS_CODE < 35)//术中 { this.BackgroundImage = Resources.card_术中; } else if (_patCard.OPER_STATUS_CODE >= 35)//术后 { this.BackgroundImage = Resources.card_术后; } if (_patCard.START_DATE_TIME.HasValue) { if (((TimeSpan)(accountRepository.GetServerTime().Data - _patCard.START_DATE_TIME)).TotalDays > 1) { lbOperationStartDate.Text = _patCard.START_DATE_TIME.Value.ToString("HH:mm"); lblAddDay.Visible = true; } else { lbOperationStartDate.Text = _patCard.START_DATE_TIME.Value.ToString("HH:mm"); lblAddDay.Visible = false; } } else { if (_patCard.SCHEDULED_DATE_TIME.HasValue) { if (((TimeSpan)(accountRepository.GetServerTime().Data - _patCard.SCHEDULED_DATE_TIME)).TotalDays > 1) { lbOperationStartDate.Text = _patCard.SCHEDULED_DATE_TIME.Value.ToString("HH:mm"); lblAddDay.Visible = true; } else { lbOperationStartDate.Text = _patCard.SCHEDULED_DATE_TIME.Value.ToString("HH:mm"); lblAddDay.Visible = false; } } else { lbOperationStartDate.Text = string.Empty; lblAddDay.Visible = false; } } string DEPT_CODE = string.Empty; if (!string.IsNullOrEmpty(_patCard.DEPT_CODE)) { MED_DEPT_DICT deptDict = comnDictRepository.GetDeptDict(_patCard.DEPT_CODE).Data; DEPT_CODE = deptDict == null ? _patCard.DEPT_CODE : deptDict.DEPT_NAME; } labelInfo.Text = _patCard.INP_NO; labelDeptName.Text = DEPT_CODE; labelBedNo.Text = _patCard.BED_NO + " 床"; lbOperationName.Text = _patCard.OPERATION_NAME; string strlbSurgeon = string.Empty; if (!string.IsNullOrEmpty(_patCard.SURGEON)) { MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.SURGEON).Data; strlbSurgeon = hisUsers == null ? _patCard.SURGEON : hisUsers.USER_NAME; } string strlbAnesDoctor = string.Empty; if (!string.IsNullOrEmpty(_patCard.ANES_DOCTOR)) { MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.ANES_DOCTOR).Data; strlbAnesDoctor = hisUsers == null ? _patCard.ANES_DOCTOR : hisUsers.USER_NAME; } string strlbAnesAss = string.Empty; if (!string.IsNullOrEmpty(_patCard.FIRST_ANES_ASSISTANT)) { MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.FIRST_ANES_ASSISTANT).Data; strlbAnesAss = hisUsers == null ? _patCard.FIRST_ANES_ASSISTANT : hisUsers.USER_NAME; } lbSurgeon.Text = string.Format("术者:{0} 麻醉:{1} {2}", strlbSurgeon, strlbAnesDoctor, strlbAnesAss); this.lbAnesMethod.Text = _patCard.ANES_METHOD; this.lblOperScal.Text = !string.IsNullOrEmpty(_patCard.OPER_SCALE) ? _patCard.OPER_SCALE + " 级" : ""; this.lblOperPost.Text = _patCard.OPER_POSITION; switch (_patCard.ASA_GRADE) { case "Ⅰ": case "1": case "一": pictureBoxOPER_SCALE.Image = Resources.一级; break; case "Ⅱ": case "2": case "二": pictureBoxOPER_SCALE.Image = Resources.二级; break; case "Ⅲ": case "3": case "三": pictureBoxOPER_SCALE.Image = Resources.级; break; case "Ⅳ": case "4": case "四": pictureBoxOPER_SCALE.Image = Resources.四级; break; } if (_patCard.EMERGENCY_IND == 1) { pictureBoxJZ.Visible = true; } if (_patCard.RADIATE_IND == 2) { pictureBoxFS.Visible = true; } if (_patCard.ISOLATION_IND == 2) { pictureBoxGL.Visible = true; } } else { CardVisible(false); this.BackgroundImage = Resources.card_blank; } //INFECTED_IND }
public RequestResult <int> EditMedHisUserDict(int type, MED_HIS_USERS MedHisUserDict) { return(Success(sysConfig.EditMedHisUserDict(type, MedHisUserDict))); }
/// <summary> /// 获取人员信息 /// </summary> /// <returns></returns> public IList <MED_HIS_USERS> GetMedHisUsers(MED_HIS_USERS hisUser) { return(dapper.Set <MED_HIS_USERS>().Select(d => d.USER_DEPT_CODE == hisUser.USER_DEPT_CODE && d.USER_JOB.Contains(hisUser.USER_JOB)).OrderBy(d => d.INPUT_CODE).ToList <MED_HIS_USERS>()); }