/// <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); }
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; }
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; }
/// <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); }
/// <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; }
internal Allergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance) : this(patient, allergyStatus, allergenCodedConcept) { Check.IsNotNull(provenance, () => Provenance); _provenance = provenance; }
/// <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; }
/// <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; }
internal Allergy(Patient patient, AllergyStatus allergyStatus, CodedConcept allergenCodedConcept, Provenance provenance) : this(patient, allergyStatus, allergenCodedConcept) { Check.IsNotNull ( provenance, () => Provenance ); _provenance = provenance; }
/// <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; }