コード例 #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
ファイル: AllergyFactory.cs プロジェクト: divyang4481/REM
 /// <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;
        }
コード例 #9
0
 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;
 }