/// <summary>
 /// Removes the specified illness period from the specified patient's
 /// illness history.
 /// </summary>
 /// <param name="illnessPeriod">The illness period.</param>
 /// <param name="patient">The patient.</param>
 public void Remove(IllnessPeriodDto illnessPeriod, LightPatientDto patient)
 {
     new Remover(this.Session).Remove(illnessPeriod, patient);
 }
 /// <summary>
 /// Creates the specified illness period for the specified patient.
 /// </summary>
 /// <param name="period">The period.</param>
 /// <param name="patient">The patient.</param>
 public void Create(IllnessPeriodDto period, LightPatientDto patient)
 {
     new Creator(this.Session).Create(period, patient);
 }
Example #3
0
        /// <summary>
        /// Creates the specified illness period for the specified patient.
        /// </summary>
        /// <param name="period">The period.</param>
        /// <param name="patient">The patient.</param>
        public void Create(IllnessPeriodDto period, LightPatientDto patient)
        {
            var entity = this.Session.Get<Patient>(patient.Id);
            var illnessPeriod = Mapper.Map<IllnessPeriodDto, IllnessPeriod>(period);

            entity.IllnessHistory.Add(illnessPeriod);
            this.Session.SaveOrUpdate(entity);
        }