// Gets all unique protocols from each chart series to ensure each protocol is only counted once private HashSet <Protocol> getUniqueProtocols(ChartSeries cs, HashSet <Protocol> protocolsUnique) { List <PatientProtocol> patientProtocols; List <Patient> patients = cs.getPatients(); foreach (Patient patient in patients) { patientProtocols = database.getPatientProtocol(patient); patientProtocols.ForEach(pp => protocolsUnique.Add(pp.Protocol)); } return(protocolsUnique); }
public DateTime getIntervalStartDate(Protocol protocol, Interval interval) { return(database.getPatientProtocol(this).FirstOrDefault(pp => pp.ProtocolID == protocol.Id).Start_Date); }