예제 #1
0
        /// <summary>
        /// Creates the allergy.
        /// </summary>
        /// <param name="patient">The patient.</param>
        /// <param name="allergyStatus">The allergy status.</param>
        /// <param name="allergenCodedConcept">The allergen coded concept.</param>
        /// <param name="provenance">The provenance.</param>
        /// <returns>
        /// An Allergy.
        /// </returns>
        public Allergy CreateAllergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
        {
            var allergy = new Allergy(patient, allergyStatus, allergenCodedConcept, provenance);

            _allergyRepository.MakePersistent(allergy);
            return(allergy);
        }
예제 #2
0
파일: Allergy.cs 프로젝트: girish66/REM
        internal Allergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept)
        {
            Check.IsNotNull(patient, () => Patient);
            Check.IsNotNull(allergyStatus, () => AllergyStatus);
            Check.IsNotNull(allergenCodedConcept, () => AllergenCodedConcept);

            _allergyReactions     = new List <AllergyReaction> ();
            _patient              = patient;
            _allergyStatus        = allergyStatus;
            _allergenCodedConcept = allergenCodedConcept;
        }
예제 #3
0
파일: Allergy.cs 프로젝트: divyang4481/REM
        internal Allergy( Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept )
        {
            Check.IsNotNull ( patient, () => Patient );
            Check.IsNotNull ( allergyStatus, () => AllergyStatus );
            Check.IsNotNull ( allergenCodedConcept, () => AllergenCodedConcept );

            _allergyReactions = new List<AllergyReaction> ();
            _patient = patient;
            _allergyStatus = allergyStatus;
            _allergenCodedConcept = allergenCodedConcept;
        }
예제 #4
0
파일: Patient.cs 프로젝트: girish66/REM
        /// <summary>
        /// Adds the allergy.
        /// </summary>
        /// <param name="allergyStatus">The allergy status.</param>
        /// <param name="allergenCodedConcept">The allergen coded concept.</param>
        /// <param name="provenance">The provenance.</param>
        /// <returns>AN Allergy.</returns>
        public virtual Allergy AddAllergy(AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
        {
            InitializeServices();

            var factory = IoC.CurrentContainer.Resolve <IAllergyFactory>();
            var allergy = factory.CreateAllergy(this, allergyStatus, allergenCodedConcept, provenance);

            _allergies.Add(allergy);

            NotifyItemAdded(() => Allergies, allergy);

            return(allergy);
        }
예제 #5
0
 /// <summary>
 /// Creates the allergy.
 /// </summary>
 /// <param name="patient">The patient.</param>
 /// <param name="allergyStatus">The allergy status.</param>
 /// <param name="allergenCodedConcept">The allergen coded concept.</param>
 /// <param name="provenance">The provenance.</param>
 /// <returns>
 /// An Allergy.
 /// </returns>
 public Allergy CreateAllergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
 {
     var allergy = new Allergy(patient, allergyStatus, allergenCodedConcept, provenance);
     _allergyRepository.MakePersistent(allergy);
     return allergy;
 }
예제 #6
0
파일: Allergy.cs 프로젝트: girish66/REM
 internal Allergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
     : this(patient, allergyStatus, allergenCodedConcept)
 {
     Check.IsNotNull(provenance, () => Provenance);
     _provenance = provenance;
 }
예제 #7
0
파일: Allergy.cs 프로젝트: girish66/REM
 /// <summary>
 /// Revises the allergy status.
 /// </summary>
 /// <param name="allergyStatus">The allergy status.</param>
 public virtual void ReviseAllergyStatus(AllergyStatus allergyStatus)
 {
     Check.IsNotNull(allergyStatus, "allergyStatus is required.");
     AllergyStatus = allergyStatus;
 }
예제 #8
0
파일: Patient.cs 프로젝트: divyang4481/REM
        /// <summary>
        /// Adds the allergy.
        /// </summary>
        /// <param name="allergyStatus">The allergy status.</param>
        /// <param name="allergenCodedConcept">The allergen coded concept.</param>
        /// <param name="provenance">The provenance.</param>
        /// <returns>AN Allergy.</returns>
        public virtual Allergy AddAllergy(AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
        {
            InitializeServices();

            var factory = IoC.CurrentContainer.Resolve<IAllergyFactory>();
            var allergy = factory.CreateAllergy(this, allergyStatus, allergenCodedConcept, provenance);
            _allergies.Add(allergy);

            NotifyItemAdded(() => Allergies, allergy);

            return allergy;
        }
 private Allergy BuildAllergy( Patient patient, AllergyStatus allergyStatus, CodedConcept allergen )
 {
     var allergy = new Allergy ( patient, allergyStatus, allergen );
     Session.SaveOrUpdate ( allergy );
     return allergy;
 }
예제 #10
0
파일: Allergy.cs 프로젝트: divyang4481/REM
 internal Allergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance)
     : this(patient, allergyStatus, allergenCodedConcept)
 {
     Check.IsNotNull ( provenance, () => Provenance );
     _provenance = provenance;
 }
예제 #11
0
파일: Allergy.cs 프로젝트: divyang4481/REM
 /// <summary>
 /// Revises the allergy status.
 /// </summary>
 /// <param name="allergyStatus">The allergy status.</param>
 public virtual void ReviseAllergyStatus( AllergyStatus allergyStatus )
 {
     Check.IsNotNull ( allergyStatus, "allergyStatus is required." );
     AllergyStatus = allergyStatus;
 }