/// <summary>
 /// Gets the <see cref="AASObjection"/>
 /// </summary>
 /// <param name="pateintInfoEntity">The AASObjectionEntity.</param>
 /// <returns></returns>
 public  PatientInfo GetPatientInfo(PatientInfoEntity pateintInfoEntity)
 {
     PatientInfo patinetInfo = null;
     try
     {
         patinetInfo = Mapper.Map<PatientInfoEntity, PatientInfo>(pateintInfoEntity);
     }
     catch (Exception ex)
     {
         Logger.Error("Error encountered at GetPatientInfo", ex);
         throw;
     }
     return patinetInfo;
 }
 /// <summary>
 /// Saves the or update audit entity.
 /// </summary>
 /// <param name="auditEntity">The audit entity.</param>
 /// <param name="isCopy">if set to <c>true</c> [is copy].</param>
 public void SaveOrUpdatePatientInfoEntity(PatientInfoEntity patientEntity, bool isCopy)
 {
     try
     {
         GenericGateway genericGateway = new GenericGateway();
         genericGateway.SaveOrUpdateEntity<PatientInfo>(mapper.GetPatientInfo(patientEntity), isCopy);
     }
     catch (Exception ex)
     {
         Logger.Error("Error at SaveOrUpdatePatientInfoEntity", ex);
         Logger.Error("Error in SaveOrUpdatePatientInfoEntity: Message - " + ex.Message + " StackTrace - " + ex.StackTrace);
         throw;
     }
 }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IPatientMediator imp = BinderSingleton.Instance.GetInstance<IPatientMediator>();
            imp.BeginTransaction();
            PatientInfoEntity objEntity = new PatientInfoEntity();
            objEntity.UserName = "******";
            objEntity.PatientId = AllInOne.Common.Library.Util.CommonUtil.CreateUniqueID("BE");
            objEntity.EmailId = "*****@*****.**";
            objEntity.ObsInd = YesNo.N;
            objEntity.LastModifiedDate = DateTime.Now;
            objEntity.LastModifiedBy = "test";
            imp.SaveOrUpdatePatientInfoEntity(objEntity, true);
            imp.CommitAndCloseSession();


            objEntity = imp.GetPatientInfoEntity(objEntity.PatientId);
        }