/// <summary> /// Revises the enrollment date. /// </summary> /// <param name="enrollmentDate">The enrollment date.</param> public virtual void ReviseEnrollmentDate(DateTime enrollmentDate) { DomainRuleEngine.CreateRuleEngine <ProgramEnrollment, DateTime> (this, () => ReviseEnrollmentDate) .WithContext(enrollmentDate) .WithContext(EnrollingStaff) .Execute(() => EnrollmentDate = enrollmentDate); }
/// <summary> /// Destroys the program. /// </summary> /// <param name="program">The program.</param> public void DestroyProgram(Program program) { Check.IsNotNull(program, "Program is required"); DomainRuleEngine.CreateRuleEngine(program, () => DestroyProgram) .Execute(() => _programRepository.MakeTransient(program)); }
/// <summary> /// Destroys the program offering. /// </summary> /// <param name="programOffering">The program offering.</param> public void DestroyProgramOffering(ProgramOffering programOffering) { Check.IsNotNull(programOffering, "Program is required"); DomainRuleEngine.CreateRuleEngine(programOffering, () => DestroyProgramOffering) .Execute(() => _programOfferingRepository.MakeTransient(programOffering)); }
/// <summary> /// Renames the program. /// </summary> /// <param name="name">The name.</param> public virtual void RenameProgram(string name) { Check.IsNotNullOrWhitespace(name, "name is required."); DomainRuleEngine.CreateRuleEngine <Program, string> (this, () => RenameProgram) .WithContext(name) .Execute(() => Name = name); }
/// <summary> /// Revises the enrolling staff. /// </summary> /// <param name="enrollingStaff">The enrolling staff.</param> public virtual void ReviseEnrollingStaff(Staff enrollingStaff) { Check.IsNotNull(enrollingStaff, "Enrolling Staff is required."); DomainRuleEngine.CreateRuleEngine <ProgramEnrollment, Staff> (this, () => ReviseEnrollingStaff) .WithContext(enrollingStaff) .Execute(() => EnrollingStaff = enrollingStaff); }
/// <summary> /// Sets the primary photo. /// </summary> /// <param name="patientPhoto">The patient photo.</param> public virtual void SetPrimaryPhoto(PatientPhoto patientPhoto) { Check.IsNotNull(patientPhoto, "patientPhoto is required."); DomainRuleEngine.CreateRuleEngine <Patient, PatientPhoto> (this, () => SetPrimaryPhoto) .WithContext(patientPhoto) .Execute(() => PrimaryPatientPhoto = patientPhoto); }
/// <summary> /// The revise location address. /// </summary> /// <param name="locationAddress"> /// The location address. /// </param> public virtual void ReviseLocationAddress(LocationAddress locationAddress) { Check.IsNotNull(locationAddress, () => LocationAddress); DomainRuleEngine.CreateRuleEngine <Location, LocationAddress> (Location, () => ReviseLocationAddress) .WithContext(locationAddress) .WithContext(this) .Execute(() => { LocationAddress = locationAddress; }); }
/// <summary> /// The revise name. /// </summary> /// <param name="name"> /// The name. /// </param> public virtual void ReviseName(string name) { Check.IsNotNullOrWhitespace(name, () => Name); DomainRuleEngine.CreateRuleEngine <Location, string> (Location, () => ReviseName) .WithContext(name) .WithContext(this) .Execute(() => { Name = name; }); }
/// <summary> /// Revises the activity date time range. /// </summary> /// <param name="dateTimeRange">The date time range.</param> public virtual void ReviseActivityDateTimeRange(DateTimeRange dateTimeRange) { Check.IsNotNull(dateTimeRange, "Activity date time range is required."); ActivityDateTimeRange = dateTimeRange; DomainRuleEngine.CreateRuleEngine <Activity, DateTimeRange>(this, () => ReviseActivityDateTimeRange) .WithContext(dateTimeRange) .Execute(() => ActivityDateTimeRange = dateTimeRange); }
/// <summary> /// Revises the clinical case profile. /// </summary> /// <param name="clinicalCaseProfile">The clinical case profile.</param> public virtual void ReviseClinicalCaseProfile(ClinicalCaseProfile clinicalCaseProfile) { Check.IsNotNull(clinicalCaseProfile, "Clinical Case Profile is required."); DomainRuleEngine.CreateRuleEngine <ClinicalCase, ClinicalCaseProfile>(this, () => ReviseClinicalCaseProfile) .WithContext(clinicalCaseProfile) .WithContext(ClinicalCaseCloseInfo) .Execute(() => ClinicalCaseProfile = clinicalCaseProfile); }
/// <summary> /// Revises the agency address. /// </summary> /// <param name="agencyAddress"> /// The agency address. /// </param> public virtual void ReviseAgencyAddress(AgencyAddress agencyAddress) { Check.IsNotNull(agencyAddress, () => AgencyAddress); DomainRuleEngine.CreateRuleEngine <Agency, AgencyAddress> (Agency, () => ReviseAgencyAddress) .WithContext(agencyAddress) .WithContext(this) .Execute(() => AgencyAddress = agencyAddress); }
/// <summary> /// Revises the teds discharge key fields. /// </summary> /// <param name="tedsDischargeKeyFields">The teds discharge key fields.</param> public virtual void ReviseTedsDischargeKeyFields(TedsDischargeKeyFields tedsDischargeKeyFields) { Check.IsNotNull(tedsDischargeKeyFields, () => TedsDischargeKeyFields); DomainRuleEngine.CreateRuleEngine(tedsDischargeKeyFields) .WithContext(tedsDischargeKeyFields) .Execute( () => { TedsDischargeKeyFields = tedsDischargeKeyFields; }); }
/// <summary> /// Revises the observation info. /// </summary> /// <param name="observedBy">The observed by.</param> /// <param name="observedDate">The observed date.</param> public virtual void ReviseObservationInfo(Staff observedBy, DateTime?observedDate) { DomainRuleEngine.CreateRuleEngine(this, "ReviseObservationInfoRuleSet") .WithContext(observedBy) .WithContext(observedDate) .Execute(() => { ObservedByStaff = observedBy; ObservedDate = observedDate; }); }
/// <summary> /// Revises the veteran information. /// </summary> /// <param name="veteranInformation">The veteran information.</param> public virtual void ReviseVeteranInformation(PatientVeteranInformation veteranInformation) { Check.IsNotNull(veteranInformation, "Patient Veteran Information is required."); DomainRuleEngine.CreateRuleEngine <Patient, PatientVeteranInformation>(this, () => ReviseVeteranInformation) .WithContext(veteranInformation) .Execute(() => { VeteranInformation = veteranInformation; }); }
/// <summary> /// Revises the last contact date. /// </summary> /// <param name="lastContactDate">The last contact date.</param> public virtual void ReviseLastFaceToFaceContactDate(DateTime?lastContactDate) { Check.IsNotNull(lastContactDate, () => LastFaceToFaceContactDate); DomainRuleEngine.CreateRuleEngine(this, "ReviseLastFaceToFaceContactDate") .WithContext(lastContactDate) .Execute( () => { LastFaceToFaceContactDate = lastContactDate; }); }
/// <summary> /// Admits the specified clinical case admission. /// </summary> /// <param name="clinicalCaseAdmission">The clinical case admission.</param> public virtual void Admit(ClinicalCaseAdmission clinicalCaseAdmission) { Check.IsNotNull(clinicalCaseAdmission, "Clinical Case Admission is required."); DomainRuleEngine.CreateRuleEngine <ClinicalCase, ClinicalCaseAdmission>(this, () => Admit) .WithContext(clinicalCaseAdmission) .Execute(() => { //TODO: Update the ClinicalCaseStatus ClinicalCaseAdmission = clinicalCaseAdmission; }); }
/// <summary> /// Discharges the specified clinical case discharge. /// </summary> /// <param name="clinicalCaseDischarge">The clinical case discharge.</param> public virtual void Discharge(ClinicalCaseDischarge clinicalCaseDischarge) { Check.IsNotNull(clinicalCaseDischarge, "Clinical Case Discharge is required."); DomainRuleEngine.CreateRuleEngine <ClinicalCase, ClinicalCaseDischarge>(this, () => Discharge) .WithContext(clinicalCaseDischarge) .Execute(() => { //TODO: Update the ClinicalCaseStatus ClinicalCaseDischarge = clinicalCaseDischarge; }); }
/// <summary> /// Closes the specified clinical case close info. /// </summary> /// <param name="clinicalCaseCloseInfo">The clinical case close info.</param> public virtual void Close(ClinicalCaseCloseInfo clinicalCaseCloseInfo) { Check.IsNotNull(clinicalCaseCloseInfo, "Clinical Case Close Info is required."); DomainRuleEngine.CreateRuleEngine <ClinicalCase, ClinicalCaseCloseInfo>(this, () => Close) .WithContext(clinicalCaseCloseInfo) .WithContext(ClinicalCaseProfile) .Execute(() => { //TODO: Update the ClinicalCaseStatus ClinicalCaseCloseInfo = clinicalCaseCloseInfo; }); }
/// <summary> /// Add address. /// </summary> /// <param name="address"> /// The address. /// </param> public virtual void AddAddress(StaffAddress address) { Check.IsNotNull(address, "Address is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffAddress> (this, () => AddAddress) .WithContext(address) .Execute(() => { address.Staff = this; _addresses.Add(address); NotifyItemAdded(() => Addresses, address); }); }
/// <summary> /// Add phone. /// </summary> /// <param name="phone"> /// The phone. /// </param> public virtual void AddPhone(StaffPhone phone) { Check.IsNotNull(phone, "Phone is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffPhone> (this, () => AddPhone) .WithContext(phone) .Execute(() => { phone.Staff = this; _phoneNumbers.Add(phone); NotifyItemAdded(() => PhoneNumbers, phone); }); }
/// <summary> /// The add email address. /// </summary> /// <param name="locationEmailAddress"> /// The location email address. /// </param> public virtual void AddEmailAddress(LocationEmailAddress locationEmailAddress) { Check.IsNotNull(locationEmailAddress, "locationEmailAddress is required."); DomainRuleEngine.CreateRuleEngine <Location, LocationEmailAddress> (this, () => AddEmailAddress) .WithContext(locationEmailAddress) .Execute(() => { locationEmailAddress.Location = this; _emailAddresses.Add(locationEmailAddress); NotifyItemAdded(() => EmailAddresses, locationEmailAddress); }); }
/// <summary> /// The add contact. /// </summary> /// <param name="locationContact"> /// The location contact. /// </param> public virtual void AddContact(LocationContact locationContact) { Check.IsNotNull(locationContact, "locationContact is required."); DomainRuleEngine.CreateRuleEngine <Location, LocationContact> (this, () => AddContact) .WithContext(locationContact) .Execute(() => { locationContact.Location = this; _locationContacts.Add(locationContact); NotifyItemAdded(() => LocationContacts, locationContact); }); }
/// <summary> /// The add identifier. /// </summary> /// <param name="locationIdentifier"> /// The location identifier. /// </param> public virtual void AddIdentifier(LocationIdentifier locationIdentifier) { Check.IsNotNull(locationIdentifier, "locationIdentifier is required."); DomainRuleEngine.CreateRuleEngine <Location, LocationIdentifier> (this, () => AddIdentifier) .WithContext(locationIdentifier) .Execute(() => { locationIdentifier.Location = this; _locationIdentifiers.Add(locationIdentifier); NotifyItemAdded(() => LocationIdentifiers, locationIdentifier); }); }
/// <summary> /// The add work hour. /// </summary> /// <param name="locationWorkHour"> /// The location work hour. /// </param> public virtual void AddWorkHour(LocationWorkHour locationWorkHour) { Check.IsNotNull(locationWorkHour, "locationWorkHour is required."); DomainRuleEngine.CreateRuleEngine <LocationOperationSchedule, LocationWorkHour> (this, () => AddWorkHour) .WithContext(locationWorkHour) .Execute(() => { locationWorkHour.LocationOperationSchedule = this; _locationWorkHours.Add(locationWorkHour); NotifyItemAdded(() => LocationWorkHours, locationWorkHour); }); }
/// <summary> /// Add college degree. /// </summary> /// <param name="collegeDegree"> /// The college degree. /// </param> public virtual void AddCollegeDegree(StaffCollegeDegree collegeDegree) { Check.IsNotNull(collegeDegree, "CollegeDegree is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffCollegeDegree> (this, () => AddCollegeDegree) .WithContext(collegeDegree) .Execute(() => { collegeDegree.Staff = this; _collegeDegrees.Add(collegeDegree); NotifyItemAdded(() => CollegeDegrees, collegeDegree); }); }
/// <summary> /// The add license. /// </summary> /// <param name="license"> /// The license. /// </param> public virtual void AddLicense(StaffLicense license) { Check.IsNotNull(license, "License is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffLicense> (this, () => AddLicense) .WithContext(license) .Execute(() => { license.Staff = this; _licenses.Add(license); NotifyItemAdded(() => Licenses, license); }); }
/// <summary> /// Adds the certification. /// </summary> /// <param name="certification"> /// The certification. /// </param> public virtual void AddCertification(StaffCertification certification) { Check.IsNotNull(certification, "Certification is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffCertification> (this, () => AddCertification) .WithContext(certification) .Execute(() => { certification.Staff = this; _certifications.Add(certification); NotifyItemAdded(() => Certifications, certification); }); }
/// <summary> /// Adds the training course. /// </summary> /// <param name="trainingCourse"> /// The training course. /// </param> public virtual void AddTrainingCourse(StaffTrainingCourse trainingCourse) { Check.IsNotNull(trainingCourse, "Training course is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffTrainingCourse> (this, () => AddTrainingCourse) .WithContext(trainingCourse) .Execute(() => { trainingCourse.Staff = this; _trainingCourses.Add(trainingCourse); NotifyItemAdded(() => TrainingCourses, trainingCourse); }); }
/// <summary> /// Add identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void AddIdentifier(StaffIdentifier identifier) { Check.IsNotNull(identifier, "Identifier is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffIdentifier> (this, () => AddIdentifier) .WithContext(identifier) .Execute(() => { identifier.Staff = this; _identifiers.Add(identifier); NotifyItemAdded(() => Identifiers, identifier); }); }
/// <summary> /// Adds the language. /// </summary> /// <param name="language"> /// The language. /// </param> public virtual void AddLanguage(StaffLanguage language) { Check.IsNotNull(language, "Language is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffLanguage> (this, () => AddLanguage) .WithContext(language) .Execute(() => { language.Staff = this; _languages.Add(language); NotifyItemAdded(() => Languages, language); }); }