コード例 #1
0
 /// <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);
 }
コード例 #2
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)
 {
     new Creator(this.Session).Create(period, patient);
 }
コード例 #3
0
ファイル: Creator.cs プロジェクト: seniorOtaka/ndoctor
        /// <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);
        }