/// <summary> /// 获得当前时间 /// </summary> /// <returns></returns> public DateTime GetCurrentDateTime() { try { return(Convert.ToDateTime(DS_SqlHelper.ExecuteScalar("select sysdate from dual", CommandType.Text))); } catch (Exception ex) { throw ex; } }
private string GetEmrContentByID(string id) { try { string sqlGetEmrContent = string.Format("select content from recorddetail where id = '{0}'", id); return(DS_SqlHelper.ExecuteScalar(sqlGetEmrContent, CommandType.Text).ToString()); } catch { return(""); } }
/// <summary> /// 获取指定类型的病历内容 Add by wwj 2013-03-07 /// </summary> /// <param name="emrType"></param> /// <param name="noofinpat"></param> /// <returns></returns> private string GetEmrContent(string emrType, string noofinpat) { try { DS_SqlHelper.CreateSqlHelper(); string sqlGetEmrContent = string.Format("select content from recorddetail where noofinpat = '{0}' and sortid = '{1}' and valid = '1'", noofinpat, emrType); return(DS_SqlHelper.ExecuteScalar(sqlGetEmrContent).ToString()); } catch (Exception ex) { throw ex; } }
public string GetDeptName(string deptcode) { try { if (deptcode == "") { return(""); } string sql = string.Format(@"select d.name from department d where d.id='{0}' ", deptcode); return(DS_SqlHelper.ExecuteScalar(sql).ToString()); } catch (Exception) { throw; } }
/// <summary> /// 判断此会诊单是否已经有医师签到 true:有医师签到 false:没有医师签到 /// </summary> /// <param name="consultationApplySN"></param> /// <returns></returns> private bool CheckIsSign(string consultationApplySN) { try { string sqlGetSignCount = "select count(1) from consultrecorddepartment where issignin = '1' and consultapplysn = '{0}' and valid = '1'"; int count = Convert.ToInt32(DS_SqlHelper.ExecuteScalar(string.Format(sqlGetSignCount, consultationApplySN), CommandType.Text)); if (count > 0) { return(true); } return(false); } catch (Exception ex) { throw ex; } }
private bool IsInSertDate(DataRow dr) { try { string noofinpat = dr["noofinpat"].ToString(); string dateofsurvey = m_CurrDatetime; string timeslot = m_CurTimeslot; string sql = string.Format(@"select count(*) from notesonnursing n where n.noofinpat='{0}' and n.dateofsurvey='{1}' and n.timeslot='{2}'", noofinpat, dateofsurvey, timeslot); Object obValue = DS_SqlHelper.ExecuteScalar(sql, CommandType.Text); int intValue = Convert.ToInt32(obValue); return(intValue <= 0 ? true : false); } catch (Exception ex) { throw ex; } }
/// <summary> /// 判断该病人是否存在首次病程 /// </summary> /// <param name="noofinpat"></param> /// <returns></returns> public bool IsHasFirstDailyEmr(string noofinpat) { try { string sqlGetFirstDaily = string.Format( @"select count(1) from recorddetail r where r.noofinpat = '{0}' and r.valid = '1' and r.firstdailyflag = '1'", noofinpat); string cnt = DS_SqlHelper.ExecuteScalar(sqlGetFirstDaily, CommandType.Text).ToString(); if (cnt != "0") { return(true); } return(false); } catch (Exception) { throw; } }