Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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));
        }
Esempio n. 3
0
        /// <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);
            });
        }
Esempio n. 4
0
        /// <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 );
        }
Esempio n. 5
0
        /// <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);
        }
Esempio n. 6
0
        /// <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 );
                        } );
        }