예제 #1
0
        public QueryAuditHelper(DicomAuditSource auditSource,
                                EventIdentificationContentsEventOutcomeIndicator outcome,
                                AuditActiveParticipant sourceUser, string destinationAE, string destinationHost, string queryParameters)
            : base("Query")
        {
            AuditMessage.EventIdentification = new EventIdentificationContents
            {
                EventID                  = EventID.Query,
                EventActionCode          = EventIdentificationContentsEventActionCode.E,
                EventActionCodeSpecified = true,
                EventDateTime            = Platform.Time.ToUniversalTime(),
                EventOutcomeIndicator    = outcome
            };

            InternalAddAuditSource(auditSource);

            InternalAddActiveParticipant(sourceUser);

            IPAddress x;

            _participantList.Add(new ActiveParticipantContents(RoleIDCode.Destination, "AETITLE=" + destinationAE, null,
                                                               null,
                                                               destinationHost,
                                                               IPAddress.TryParse(destinationHost, out x)
                                                                                ? NetworkAccessPointTypeEnum.IpAddress
                                                                                : NetworkAccessPointTypeEnum.MachineName, null));

            AuditQueryMessageParticipantObject o =
                new AuditQueryMessageParticipantObject(queryParameters);

            InternalAddParticipantObject("Query", o);
        }
예제 #2
0
        /// <summary>
        /// Add the ID of person or process that started or stopped the Application.  Can be called multiple times.
        /// </summary>
        /// <param name="participant">The participant.</param>
        public void AddUserParticipant(AuditActiveParticipant participant)
        {
            participant.RoleIdCode      = CodedValueType.ApplicationLauncher;
            participant.UserIsRequestor = true;

            InternalAddActiveParticipant(participant);
        }
예제 #3
0
		public QueryAuditHelper(DicomAuditSource auditSource,
	EventIdentificationContentsEventOutcomeIndicator outcome,
	AuditActiveParticipant sourceUser, string destinationAE, string destinationHost, string queryParameters)
			: base("Query")
		{
			AuditMessage.EventIdentification = new EventIdentificationContents
			{
				EventID = EventID.Query,
				EventActionCode = EventIdentificationContentsEventActionCode.E,
				EventActionCodeSpecified = true,
				EventDateTime = Platform.Time.ToUniversalTime(),
				EventOutcomeIndicator = outcome
			};

			InternalAddAuditSource(auditSource);

			InternalAddActiveParticipant(sourceUser);

			IPAddress x;
			_participantList.Add(new ActiveParticipantContents(RoleIDCode.Destination, "AETITLE=" + destinationAE, null,
			                                                       null,
			                                                       destinationHost,
			                                                       IPAddress.TryParse(destinationHost, out x)
			                                                       	? NetworkAccessPointTypeEnum.IpAddress
			                                                       	: NetworkAccessPointTypeEnum.MachineName, null));

			AuditQueryMessageParticipantObject o =
				new AuditQueryMessageParticipantObject(queryParameters);

			InternalAddParticipantObject("Query", o);
			
		}
		/// <summary>
		/// Add the ID of person or process that started or stopped the Application.  Can be called multiple times.
		/// </summary>
		/// <param name="participant">The participant.</param>
		public void AddUserParticipant(AuditActiveParticipant participant)
		{
            participant.RoleIdCode = RoleIDCode.ApplicationLauncher;
			participant.UserIsRequestor = true;

			InternalAddActiveParticipant(participant);
		}
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="auditSource">The source of the audit.</param>
		/// <param name="outcome">The outcome (success or failure)</param>
		/// <param name="participant">The active participant in the audit</param>
		public DataExportAuditHelper(DicomAuditSource auditSource, EventIdentificationContentsEventOutcomeIndicator outcome, AuditActiveParticipant participant)
			: base("DataExport")
		{
			AuditMessage.EventIdentification = new EventIdentificationContents
				{
					EventID = EventID.Export,
					EventActionCode = EventIdentificationContentsEventActionCode.E,
					EventActionCodeSpecified = true,
					EventDateTime = Platform.Time.ToUniversalTime(),
					EventOutcomeIndicator = outcome
				};

			InternalAddAuditSource(auditSource);
			AddUserParticipant(new AuditProcessActiveParticipant());

			// Add the Destination
			_participantList.Add(
				new ActiveParticipantContents(participant));
		}
예제 #6
0
        public ActiveParticipantContents(AuditActiveParticipant participant)
        {
            if (participant.RoleIdCode != null)
            {
                RoleIDCode    = new RoleIDCode[1];
                RoleIDCode[0] = participant.RoleIdCode;
            }
            if (participant.UserIsRequestor.HasValue)
            {
                UserIsRequestor = participant.UserIsRequestor.Value;
            }
            if (participant.UserId != null)
            {
                UserID = participant.UserId;
            }
            if (participant.AlternateUserId != null)
            {
                AlternativeUserID = participant.AlternateUserId;
            }
            if (participant.UserName != null)
            {
                UserName = participant.UserName;
            }

            if (participant.NetworkAccessPointId != null)
            {
                NetworkAccessPointID = participant.NetworkAccessPointId;
            }

            if (participant.NetworkAccessPointType.HasValue)
            {
                NetworkAccessPointTypeCode          = (ActiveParticipantContentsNetworkAccessPointTypeCode)participant.NetworkAccessPointType.Value;
                NetworkAccessPointTypeCodeSpecified = true;
            }
            else
            {
                NetworkAccessPointTypeCodeSpecified = false;
            }
        }
예제 #7
0
파일: EventSource.cs 프로젝트: nhannd/Xian
			protected override AuditActiveParticipant AsAuditActiveParticipant()
			{
				return _currentUserActiveParticipant ??
				       (_currentUserActiveParticipant =
				        new AuditPersonActiveParticipant(_username, string.Empty, _username));
			}
예제 #8
0
파일: EventSource.cs 프로젝트: nhannd/Xian
			protected override AuditActiveParticipant AsAuditActiveParticipant()
			{
				return _currentUserActiveParticipant ??
				       (_currentUserActiveParticipant =
				        new AuditPersonActiveParticipant(GetUserName(), string.Empty, GetUserName()));
			}
예제 #9
0
		/// <summary>
		/// Add an exporter.
		/// </summary>
		/// <param name="userId">The identity of the local user or process exporting the data. If both
		/// are known, then two active participants shall be included (both the
		/// person and the process).</param>
		/// <param name="userName">The name of the user</param>
		/// <param name="userIsRequestor">Flag telling if the exporter is a user (as opposed to a process)</param>
		public void AddExporter(AuditActiveParticipant participant)
		{
			participant.RoleIdCode = CodedValueType.SourceMedia;
			participant.UserIsRequestor = true;
			InternalAddActiveParticipant(participant);
		}
예제 #10
0
		protected void InternalAddActiveParticipant(AuditActiveParticipant participant)

		{
			_participantList.Add(new ActiveParticipantContents(participant));
		}
예제 #11
0
		protected void InternalAddActiveParticipant(AuditActiveParticipant participant)

		{
			_participantList.Add(new AuditMessageActiveParticipant(participant));
		}
		/// <summary>
		/// (Optional) The identity of any other participants that might be involved andknown, especially third parties that are the requestor
		/// </summary>
		/// <param name="participant">The participant</param>
		public void AddOtherParticipants(AuditActiveParticipant participant)
		{
			InternalAddActiveParticipant(participant);
		}
예제 #13
0
 protected override AuditActiveParticipant AsAuditActiveParticipant()
 {
     return(_currentUserActiveParticipant ??
            (_currentUserActiveParticipant =
                 new AuditPersonActiveParticipant(_username, string.Empty, _username)));
 }
예제 #14
0
		/// <summary>
		/// Add an importer.
		/// </summary>
		/// <param name="userId">The identity of the local user or process importer the data. If both
		/// are known, then two active participants shall be included (both the
		/// person and the process).</param>
		/// <param name="participant">The active participant</param>
		public void AddImporter(AuditActiveParticipant participant)
		{
			participant.UserIsRequestor = true;
			participant.RoleIdCode = CodedValueType.Destination;
			InternalAddActiveParticipant(participant);
		}
예제 #15
0
 protected override AuditActiveParticipant AsAuditActiveParticipant()
 {
     return(_currentUserActiveParticipant ??
            (_currentUserActiveParticipant =
                 new AuditPersonActiveParticipant(GetUserName(), string.Empty, GetUserName())));
 }
예제 #16
0
		public AuditMessageActiveParticipant(AuditActiveParticipant participant)
		{
			if (participant.RoleIdCode != null)
			{
				RoleIDCode = new CodedValueType[1];
				RoleIDCode[0] = participant.RoleIdCode;
			}
			if (participant.UserIsRequestor.HasValue)
			{
				UserIsRequestor = participant.UserIsRequestor.Value;
			}
			if (participant.UserId != null)
			{
				UserID = participant.UserId;
			}
			if (participant.AlternateUserId != null)
			{
				AlternativeUserID = participant.AlternateUserId;
			}
			if (participant.UserName != null)
				UserName = participant.UserName;

			if (participant.NetworkAccessPointId != null)
				NetworkAccessPointID = participant.NetworkAccessPointId;

			if (participant.NetworkAccessPointType.HasValue)
			{
				NetworkAccessPointTypeCode = (byte) participant.NetworkAccessPointType.Value;
				NetworkAccessPointTypeCodeSpecified = true;
			}
			else
				NetworkAccessPointTypeCodeSpecified = false;
		}
예제 #17
0
        protected void InternalAddActiveParticipant(AuditActiveParticipant participant)

        {
            _participantList.Add(new ActiveParticipantContents(participant));
        }
예제 #18
0
 /// <summary>
 /// (Optional) The identity of any other participants that might be involved andknown, especially third parties that are the requestor
 /// </summary>
 /// <param name="participant">The participant</param>
 public void AddOtherParticipants(AuditActiveParticipant participant)
 {
     InternalAddActiveParticipant(participant);
 }
예제 #19
0
 /// <summary>
 /// Add an exporter.
 /// </summary>
 /// <param name="userId">The identity of the local user or process exporting the data. If both
 /// are known, then two active participants shall be included (both the
 /// person and the process).</param>
 /// <param name="userName">The name of the user</param>
 /// <param name="userIsRequestor">Flag telling if the exporter is a user (as opposed to a process)</param>
 public void AddExporter(AuditActiveParticipant participant)
 {
     participant.RoleIdCode      = CodedValueType.SourceMedia;
     participant.UserIsRequestor = true;
     InternalAddActiveParticipant(participant);
 }
예제 #20
0
 /// <summary>
 /// Add an importer.
 /// </summary>
 /// <param name="userId">The identity of the local user or process importer the data. If both
 /// are known, then two active participants shall be included (both the
 /// person and the process).</param>
 /// <param name="participant">The active participant</param>
 public void AddImporter(AuditActiveParticipant participant)
 {
     participant.UserIsRequestor = true;
     participant.RoleIdCode      = RoleIDCode.Destination;
     InternalAddActiveParticipant(participant);
 }
예제 #21
0
        /// <summary>
        /// Add the ID of person or process deleting the study.  If both the person
        /// and process are known, both shall be included.
        /// </summary>
        /// <param name="participant">The participant.</param>
        public void AddUserParticipant(AuditActiveParticipant participant)
        {
            participant.UserIsRequestor = true;

            InternalAddActiveParticipant(participant);
        }
예제 #22
0
		/// <summary>
		/// Add an importer.
		/// </summary>
		/// <param name="participant">The active participant</param>
		public void AddImporter(AuditActiveParticipant participant)
		{
			participant.UserIsRequestor = true;
			participant.RoleIdCode = RoleIDCode.Source;
			InternalAddActiveParticipant(participant);
		}
예제 #23
0
        protected void InternalAddActiveParticipant(AuditActiveParticipant participant)

        {
            _participantList.Add(new AuditMessageActiveParticipant(participant));
        }
예제 #24
0
		/// <summary>
		/// Add the ID of person or process that started or stopped the Application.  Can be called twice.
		/// </summary>
		/// <remarks>
		/// </remarks>
		/// <param name="userId">The person or process accessing the audit trail. If both are known,
		/// then two active participants shall be included (both the person and the process).</param>
		public void AddActiveParticipant(AuditActiveParticipant participant)
		{
			participant.UserIsRequestor = true;
			InternalAddActiveParticipant(participant);
		}
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="auditSource">The source of the audit.</param>
        /// <param name="outcome">The outcome (success or failure)</param>
        /// <param name="participant">The active participant in the audit</param>
        public DataExportAuditHelper(DicomAuditSource auditSource, EventIdentificationContentsEventOutcomeIndicator outcome, AuditActiveParticipant participant)
            : base("DataExport")
        {
            AuditMessage.EventIdentification = new EventIdentificationContents
            {
                EventID                  = EventID.Export,
                EventActionCode          = EventIdentificationContentsEventActionCode.E,
                EventActionCodeSpecified = true,
                EventDateTime            = Platform.Time.ToUniversalTime(),
                EventOutcomeIndicator    = outcome
            };

            InternalAddAuditSource(auditSource);
            AddUserParticipant(new AuditProcessActiveParticipant());

            // Add the Destination
            _participantList.Add(
                new ActiveParticipantContents(participant));
        }