/// <summary> /// Removes the patient special need. /// </summary> /// <param name="patientSpecialNeed">The patient special need.</param> public virtual void RemovePatientSpecialNeed(PatientSpecialNeed patientSpecialNeed) { Check.IsNotNull(patientSpecialNeed, "patient special need is required."); _specialNeeds.Delete(patientSpecialNeed); NotifyItemRemoved(() => SpecialNeeds, patientSpecialNeed); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="patientSpecialNeed"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(PatientSpecialNeed patientSpecialNeed) { if (patientSpecialNeed == null) { return(false); } return(Equals(SpecialNeed, patientSpecialNeed.SpecialNeed)); }
/// <summary> /// Adds the patient special need. /// </summary> /// <param name="patientSpecialNeed">The patient special need.</param> public virtual void AddPatientSpecialNeed(PatientSpecialNeed patientSpecialNeed) { Check.IsNotNull(patientSpecialNeed, "patient special need is required."); DomainRuleEngine.CreateRuleEngine <Patient, PatientSpecialNeed> (this, () => AddPatientSpecialNeed) .WithContext(patientSpecialNeed) .Execute( () => { patientSpecialNeed.Patient = this; _specialNeeds.Add(patientSpecialNeed); NotifyItemAdded(() => SpecialNeeds, patientSpecialNeed); }); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="patientSpecialNeed"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual( PatientSpecialNeed patientSpecialNeed ) { if (patientSpecialNeed == null) { return false; } return Equals ( SpecialNeed, patientSpecialNeed.SpecialNeed ); }
/// <summary> /// Adds the patient special need. /// </summary> /// <param name="patientSpecialNeed">The patient special need.</param> public virtual void AddPatientSpecialNeed(PatientSpecialNeed patientSpecialNeed) { Check.IsNotNull(patientSpecialNeed, "patient special need is required."); DomainRuleEngine.CreateRuleEngine<Patient, PatientSpecialNeed> ( this, () => AddPatientSpecialNeed ) .WithContext ( patientSpecialNeed ) .Execute ( () => { patientSpecialNeed.Patient = this; _specialNeeds.Add ( patientSpecialNeed ); NotifyItemAdded ( () => SpecialNeeds, patientSpecialNeed ); } ); }