string GetDutyDoctorId(DoctorManagerPatient patient, DutyLevel dutylevel) { if (patient == null) { return(string.Empty); } string doctor = string.Empty; switch (dutylevel) { case DutyLevel.All: break; case DutyLevel.CWYS: doctor = patient.Resident; break; case DutyLevel.ZZYS: doctor = patient.Attend; break; case DutyLevel.ZRYS: doctor = patient.Chief; break; default: break; } return(doctor); }
QCRule DataRow2QCRuleBase(DataRow row) { if (row == null) { throw new ArgumentNullException("row"); } string ruleId = row[col_RuleCode].ToString(); string ruleDescription = row[col_Description].ToString(); DutyLevel dutyLevel = DutyLevel.All; if (row[col_ysjb] != DBNull.Value) { dutyLevel = (DutyLevel)(int.Parse(row[col_ysjb].ToString()) - ConstRes.cstDoctorLevelNo); } QCRule qcr = new QCRule(ruleId, ruleDescription, dutyLevel); qcr.TipInfo = row[col_Reminder].ToString(); qcr.WarnInfo = row[col_FoulMessage].ToString(); qcr.Timelimit = new TimeSpan(0, 0, Convert.ToInt32(double.Parse(row[col_TimeLimit].ToString()))); if (row[col_RelatedMark] != DBNull.Value) { qcr.RelateDealType = (RelateRuleDealType)int.Parse(row[col_RelatedMark].ToString()); } if (row[col_Mark] != DBNull.Value) { qcr.DealType = (RuleDealType)int.Parse(row[col_Mark].ToString()); } if (qcr.DealType == RuleDealType.Loop) { qcr.LoopTimes = int.Parse(row[col_xhcs].ToString()); qcr.LoopTimeInterVal = new TimeSpan(0, 0, Convert.ToInt32(double.Parse(row[col_xhjg].ToString()))); } if (int.Parse(row[col_Valid].ToString()) == 1) { qcr.Invalid = false; } else { qcr.Invalid = true; } return(qcr); }
/// <summary> /// 构造 /// </summary> public QCRule(string id, string name, DutyLevel dutylevel) { _id = id; _name = name; _dutylevel = dutylevel; }