/// <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 SaveOrUpdateAuditEntity(IAuditEntity auditEntity, bool isCopy)
 {
     try
     {
         GenericGateway genericGateway = new GenericGateway();
         genericGateway.SaveOrUpdateEntity<IAudit>(AuditMapper.GetAuditEntity<IAuditEntity>(auditEntity), isCopy);
     }
     catch (Exception ex)
     {
         Logger.Error("Error at SaveOrUpdateAuditEntity", ex);
         Logger.Error("Error in SaveOrUpdateAuditEntity: Message - " + ex.Message + " StackTrace - " + ex.StackTrace);
         throw;
     }
 }
 /// <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;
     }
 }
 /// <summary>
 /// Saves or updates the entities having reference to <see cref="ISubsequentEntity"/> interface.
 /// </summary>
 /// <param name="iSubsequentEntity"><see cref="ISubsequentEntity"/> interface</param>
 /// <param name="isCopy">If set to <c>true</c> SaveOrUpdateCopy will be used, else SaveOrUpdate.</param>
 public void SaveOrUpdateSubsequentEntity(ISubsequentEntity iSubsequentEntity, bool isCopy)
 {
     try
     {
         GenericGateway genericGateway = new GenericGateway();
         genericGateway.SaveOrUpdateEntity<ISubsequent>(SubsequentMapper.GetSubsequent<ISubsequentEntity>(iSubsequentEntity), isCopy);
     }
     catch (Exception ex)
     {
         Logger.Error("Error at SaveOrUpdateSubsequentEntity", ex);
         Logger.Error("Error in SaveOrUpdateSubsequentEntity: Message - " + ex.Message + " StackTrace - " + ex.StackTrace);
         throw;
     }
 }
        /// <summary>
        /// Saves or updates the entities having reference to <see cref="ILAPEntity"/> interface.
        /// </summary>
        /// <param name="iLAPEntity"><see cref="ILAPEntity"/> interface</param>
        /// <param name="isCopy">If set to <c>true</c> SaveOrUpdateCopy will be used, else SaveOrUpdate.</param>
        public void SaveOrUpdateLAPEntity(ILAPEntity iLAPEntity, bool isCopy)
        {
            try
            {
                GenericGateway genericGateway = new GenericGateway();
                genericGateway.SaveOrUpdateEntity<ILAP>(LAPMapper.GetLAP<ILAPEntity>(iLAPEntity), isCopy);

            }
            catch (Exception ex)
            {
                Logger.Error("Error encountered at SaveOrUpdateLAPEntity", ex);
                Logger.Error("Error encountered at SaveOrUpdateLAPEntity : Message --> " + ex.Message + " Inner Exception - " + ex.InnerException.Message);
                throw;
            }
        }
 /// <summary>
 /// Saves or updates the entities having reference to <see cref="ICommonEntity"/> interface.
 /// </summary>
 /// <param name="iCommonEntity"><see cref="ICommonEntity"/> interface</param>
 /// <param name="isCopy">If set to <c>true</c> SaveOrUpdateCopy will be used, else SaveOrUpdate.</param>
 public void SaveOrUpdateCommonEntity(ICommonEntity iCommonEntity, bool isCopy)
 {
     try
     {
         GenericGateway genericGateway = new GenericGateway();
         genericGateway.SaveOrUpdateEntity<ICommon>(CommonMapper.GetCommonEntity<ICommonEntity>(iCommonEntity), isCopy);
     }
     catch (Exception ex)
     {
         Logger.Error("Error at SaveOrUpdateCommonEntity", ex);
         Logger.Error("Error in SaveOrUpdateCommonEntity: Message - " + ex.Message + " StackTrace - " + ex.StackTrace);
         throw;
     }
 }