private void AddTask(TaskTypeId taskTypeId, List <Patient> patients) { if (patients.Count > 0) { TaskType taskType = config.GetTaskType(taskTypeId); Task task = new Task(taskType, "Номера пациентов: " + GetCommaSeparatedList(patients)); this.taskList.Add(task); } }
public TaskType GetTaskType(TaskTypeId taskTypeId) { foreach (TaskType taskType in taskTypes) { if (taskType.Id == taskTypeId) { return(taskType); } } return(new TaskType()); }
private void CheckObservations(List <Patient> patients, List <ObservationInfo> observations, ObservationTypeId observationTypeId) { List <Patient> taskPatients = new List <Patient>(); foreach (Patient patient in patients) { ObservationInfo observationInfo = GetObservationInfo(patient.Id, observations, observationTypeId); DateTime prevTime = observationInfo == null ? patient.admissionDate : observationInfo.observationTime; DateTime nextTime = depConfig.GetNextObservationTime(observationTypeId, patient.patientTypeId, prevTime, observationInfo == null); if (nextTime < DateTime.Now) { taskPatients.Add(patient); } } TaskTypeId taskTypeId = GetTaskTypeId(observationTypeId); AddTask(taskTypeId, taskPatients); }
public Task(Task task) { this.taskTypeId = task.taskTypeId; this.header = task.header; this.text = task.text; }
public Task(TaskType taskType, string text) { this.taskTypeId = taskType.Id; this.header = taskType.name; this.text = text; }
public Task(TaskTypeId taskTypeId, string header, string text) { this.taskTypeId = taskTypeId; this.header = header; this.text = text; }
public Task(TaskTypeId taskTypeId) { this.taskTypeId = taskTypeId; }
public TaskType(TaskTypeId id, string name) { this.id = id; this.name = name; }
public TaskType(TaskType t) { id = t.id; name = t.name; }