//TODO:Validate arguments public CreateConsultationCommand(ConsultationId aggregateId, PatientId patientId, DoctorId doctorId, TreatmentRoomId treatmentRoomId, DateTime registrationDate, DateTime consultationDate) : base(aggregateId) { PatientId = patientId; DoctorId = doctorId; TreatmentRoomId = treatmentRoomId; RegistrationDate = registrationDate; ConsultationDate = consultationDate; }
public ConsultationSchedulingIsCompletedEvent(PatientId patientId, DoctorId doctorId, TreatmentRoomId treatmentRoomId, DateTime patientRegistrationDate, DateTime consultationDate) { PatientId = patientId; DoctorId = doctorId; TreatmentRoomId = treatmentRoomId; PatientRegistrationDate = patientRegistrationDate; ConsultationDate = consultationDate; }
public ConsultationIsCreatedEvent(ConsultationId consultationId, PatientId patientId, DoctorId doctorId, TreatmentRoomId treatmentRoomId, DateTime registrationDate, DateTime consultationDate) { ConsultationId = consultationId; PatientId = patientId; DoctorId = doctorId; TreatmentRoomId = treatmentRoomId; RegistrationDate = registrationDate; ConsultationDate = consultationDate; Timestamp = DateTime.UtcNow; }
private void PublishReserveTreatmentroomCommand(TreatmentRoomId treatmentRoomId, DateTime reservationDay) { var command = new ReserveTreatmentRoomCommand(treatmentRoomId, reservationDay, Id.Value); this.Publish(command); }
//TODO:Instead of a tuple, return a value object private void InitiateReservation(DateTime firstAvailableDay, TreatmentRoomId treatmentRoomId, DoctorId doctorId) { this.PublishReserveTreatmentroomCommand(treatmentRoomId, firstAvailableDay); this.PublishBookDoctorCommand(doctorId, firstAvailableDay); }
public void CreateConsultation(PatientId patientId, DoctorId doctorId, TreatmentRoomId treatmentRoomId, DateTime registrationDate, DateTime consultationDate) { Specs.AggregateIsNew.ThrowDomainErrorIfNotSatisfied(this); Emit(new ConsultationIsCreatedEvent(Id, patientId, doctorId, treatmentRoomId, registrationDate, consultationDate)); }
public SchedulerHasReservedTreatmentRoom(TreatmentRoomId treatmentRoomId, DateTime reservationDay) { TreatmentRoomId = treatmentRoomId; ReservationDay = reservationDay; }