Ejemplo 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);
        }
Ejemplo 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));
        }
Ejemplo 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);
            });
        }
Ejemplo 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 );
        }
Ejemplo 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);
        }
Ejemplo 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 );
                        } );
        }