/// <summary> /// 获取病人列表 /// </summary> /// <param name="qc"></param> /// <returns></returns> public override List <PhysicalExaminePatient> GetPatientList(QueryCondiction qc) { string sql = "select PatID,VIPID,PatName,Sex,Birth,PTFlag,RegDate,Charge,ChargeFlag from Pat_Info where ChargeFlag=0 and PTFlag='P' "; if (!string.IsNullOrEmpty(qc.ExamineNo)) { sql = sql + string.Format(" and PatID='{0}'", qc.ExamineNo); } if (!string.IsNullOrEmpty(qc.FileNo)) { sql = sql + string.Format(" and VIPID='{0}'", qc.FileNo); } if (!string.IsNullOrEmpty(qc.Name)) { sql = sql + string.Format(" and PatName like '{0}%'", qc.Name); } if (!string.IsNullOrEmpty(qc.Sex)) { sql = sql + string.Format(" and Sex='{0}'", qc.Sex); } if (qc.ExamineBeginDate != null) { sql = sql + string.Format(" and RegDate>='{0} 00:00:00'", qc.ExamineBeginDate.Value.ToString("yyyy-MM-dd")); } if (qc.ExamineEndDate != null) { sql = sql + string.Format(" and RegDate<='{0} 23:59:59'", qc.ExamineEndDate.Value.ToString("yyyy-MM-dd")); } List <PhysicalExaminePatient> list = new List <PhysicalExaminePatient>(); DataTable tbList = pesDb.GetDataTable(sql); foreach (DataRow row in tbList.Rows) { PhysicalExaminePatient pat = new PhysicalExaminePatient(); pat.ExamineNo = Convertor.IsNull(row["PatID"], ""); pat.FileNo = Convertor.IsNull(row["VIPID"], ""); pat.Name = Convertor.IsNull(row["PatName"], ""); pat.ExamineDate = Convert.ToDateTime(row["RegDate"]); if (Convert.IsDBNull(row["Birth"])) { pat.BornDay = Convert.ToDateTime(row["Birth"]); } pat.Sex = Convertor.IsNull(row["Sex"], "未知"); pat.TotalCost = Convert.ToDecimal(row["Charge"]); list.Add(pat); } return(list); }
public override List <PhysicalExaminePatient> GetPatientList(QueryCondiction qc) { throw new Exception("The method or operation is not implemented."); }