コード例 #1
0
 //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;
 }
コード例 #2
0
 public ConsultationSchedulingIsCompletedEvent(PatientId patientId, DoctorId doctorId, TreatmentRoomId treatmentRoomId, DateTime patientRegistrationDate, DateTime consultationDate)
 {
     PatientId               = patientId;
     DoctorId                = doctorId;
     TreatmentRoomId         = treatmentRoomId;
     PatientRegistrationDate = patientRegistrationDate;
     ConsultationDate        = consultationDate;
 }
コード例 #3
0
 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));
 }
コード例 #7
0
 public SchedulerHasReservedTreatmentRoom(TreatmentRoomId treatmentRoomId, DateTime reservationDay)
 {
     TreatmentRoomId = treatmentRoomId;
     ReservationDay  = reservationDay;
 }