/// <summary>
        /// Method for transforming event code enum into a CodedValueType.
        /// </summary>
        /// <param name="eventTypeCode"></param>
        /// <returns></returns>
        private static CodedValueType GetEventTypeCode(SecurityAlertEventTypeCodeEnum eventTypeCode)
        {
            CodedValueType type = null;

            if (eventTypeCode == SecurityAlertEventTypeCodeEnum.NodeAuthentication)
            {
                type = CodedValueType.NodeAuthentication;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.EmergencyOverride)
            {
                type = CodedValueType.EmergencyOverride;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.NetworkConfiguration)
            {
                type = CodedValueType.NetworkConfiguration;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SecurityConfiguration)
            {
                type = CodedValueType.SecurityConfiguration;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.HardwareConfiguration)
            {
                type = CodedValueType.HardwareConfiguration;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SoftwareConfiguration)
            {
                type = CodedValueType.SoftwareConfiguration;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.UseOfRestrictedFunction)
            {
                type = CodedValueType.UseOfRestrictedFunction;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.AuditRecordingStopped)
            {
                type = CodedValueType.AuditRecordingStopped;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.AuditRecordingStarted)
            {
                type = CodedValueType.AuditRecordingStarted;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.ObjectSecurityAttributesChanged)
            {
                type = CodedValueType.ObjectSecurityAttributesChanged;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SecurityRolesChanged)
            {
                type = CodedValueType.SecurityRolesChanged;
            }
            else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.UserSecurityAttributesChanged)
            {
                type = CodedValueType.UserSecurityAttributesChanged;
            }
            return(type);
        }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="auditSource"></param>
		/// <param name="outcome">Success implies an informative alert. The other failure values
		/// imply warning codes that indicate the severity of the alert. A Minor
		/// or Serious failure indicates that mitigation efforts were effective in
		/// maintaining system security. A Major failure indicates that
		/// mitigation efforts may not have been effective, and that the security
		/// system may have been compromised.</param>
		/// <param name="eventTypeCode">The type of Security Alert event</param>
		public SecurityAlertAuditHelper(DicomAuditSource auditSource,
			EventIdentificationTypeEventOutcomeIndicator outcome,
			SecurityAlertEventTypeCodeEnum eventTypeCode)
			: base("SecurityAlert")
		{
			AuditMessage.EventIdentification = new EventIdentificationType();
			AuditMessage.EventIdentification.EventID = CodedValueType.SecurityAlert;
			AuditMessage.EventIdentification.EventActionCode = EventIdentificationTypeEventActionCode.E;
			AuditMessage.EventIdentification.EventActionCodeSpecified = true;
			AuditMessage.EventIdentification.EventDateTime = Platform.Time.ToUniversalTime();
			AuditMessage.EventIdentification.EventOutcomeIndicator = outcome;
			AuditMessage.EventIdentification.EventTypeCode = new CodedValueType[] { GetEventTypeCode(eventTypeCode) };

			InternalAddAuditSource(auditSource);
		}
        /// <summary>
        ///
        /// </summary>
        /// <param name="auditSource"></param>
        /// <param name="outcome">Success implies an informative alert. The other failure values
        /// imply warning codes that indicate the severity of the alert. A Minor
        /// or Serious failure indicates that mitigation efforts were effective in
        /// maintaining system security. A Major failure indicates that
        /// mitigation efforts may not have been effective, and that the security
        /// system may have been compromised.</param>
        /// <param name="eventTypeCode">The type of Security Alert event</param>
        public SecurityAlertAuditHelper(DicomAuditSource auditSource,
                                        EventIdentificationTypeEventOutcomeIndicator outcome,
                                        SecurityAlertEventTypeCodeEnum eventTypeCode)
            : base("SecurityAlert")
        {
            AuditMessage.EventIdentification                          = new EventIdentificationType();
            AuditMessage.EventIdentification.EventID                  = CodedValueType.SecurityAlert;
            AuditMessage.EventIdentification.EventActionCode          = EventIdentificationTypeEventActionCode.E;
            AuditMessage.EventIdentification.EventActionCodeSpecified = true;
            AuditMessage.EventIdentification.EventDateTime            = Platform.Time.ToUniversalTime();
            AuditMessage.EventIdentification.EventOutcomeIndicator    = outcome;
            AuditMessage.EventIdentification.EventTypeCode            = new CodedValueType[] { GetEventTypeCode(eventTypeCode) };

            InternalAddAuditSource(auditSource);
        }
		/// <summary>
		/// Method for transforming event code enum into a CodedValueType.
		/// </summary>
		/// <param name="eventTypeCode"></param>
		/// <returns></returns>
		private static CodedValueType GetEventTypeCode(SecurityAlertEventTypeCodeEnum eventTypeCode)
		{
			CodedValueType type = null;
			if (eventTypeCode == SecurityAlertEventTypeCodeEnum.NodeAuthentication)
				type = CodedValueType.NodeAuthentication;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.EmergencyOverride)
				type = CodedValueType.EmergencyOverride;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.NetworkConfiguration)
				type = CodedValueType.NetworkConfiguration;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SecurityConfiguration)
				type = CodedValueType.SecurityConfiguration;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.HardwareConfiguration)
				type = CodedValueType.HardwareConfiguration;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SoftwareConfiguration)
				type = CodedValueType.SoftwareConfiguration;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.UseOfRestrictedFunction)
				type = CodedValueType.UseOfRestrictedFunction;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.AuditRecordingStopped)
				type = CodedValueType.AuditRecordingStopped;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.AuditRecordingStarted)
				type = CodedValueType.AuditRecordingStarted;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.ObjectSecurityAttributesChanged)
				type = CodedValueType.ObjectSecurityAttributesChanged;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.SecurityRolesChanged)
				type = CodedValueType.SecurityRolesChanged;
			else if (eventTypeCode == SecurityAlertEventTypeCodeEnum.UserSecurityAttributesChanged)
				type = CodedValueType.UserSecurityAttributesChanged;
			return type;
		}