public static void BeginInstancesTransferAuditLogger(List<StorageInstance> instances, AssociationParameters parms)
		{
			Dictionary<string, AuditPatientParticipantObject> list = new Dictionary<string, AuditPatientParticipantObject>();

			foreach (StorageInstance instance in instances)
			{
				string key = instance.PatientId + instance.PatientsName;
				if (!list.ContainsKey(key))
				{
					AuditPatientParticipantObject patient =
						new AuditPatientParticipantObject(instance.PatientsName, instance.PatientId);
					list.Add(key, patient);
				}
			}

			foreach (AuditPatientParticipantObject patient in list.Values)
			{
				// Audit Log
				BeginTransferringDicomInstancesAuditHelper audit =
					new BeginTransferringDicomInstancesAuditHelper(ServerPlatform.AuditSource,
					                                               EventIdentificationContentsEventOutcomeIndicator.Success,
					                                               parms, patient);

				foreach (StorageInstance instance in instances)
				{
					if (patient.PatientId.Equals(instance.PatientId)
					    && patient.PatientsName.Equals(instance.PatientsName))
					{
						audit.AddStorageInstance(instance);
					}
				}

				ServerAuditHelper.LogAuditMessage(audit);
			}
		}
        /// <summary>
        /// Add details of a Patient.
        /// </summary>
        /// <param name="patient"></param>
        public void AddPatientParticipantObject(AuditPatientParticipantObject patient)
        {
            // if the participant object contains no identifying information anyway, there's no need to add it to the audit message
            var key = patient.PatientId + patient.PatientsName;

            if (!string.IsNullOrEmpty(key))
            {
                InternalAddParticipantObject(key, patient);
            }
        }
        public BeginTransferringDicomInstancesAuditHelper(DicomAuditSource auditSource, EventIdentificationContentsEventOutcomeIndicator outcome,
			string sourceAE, string sourceHost, string destinationAE, string destinationHost,
			AuditPatientParticipantObject patient)
			: base("BeginTransferringDicomInstances")
		{
			AuditMessage.EventIdentification = new EventIdentificationContents();
			AuditMessage.EventIdentification.EventID = EventID.BeginTransferringDICOMInstances;
			AuditMessage.EventIdentification.EventActionCode = EventIdentificationContentsEventActionCode.E;
			AuditMessage.EventIdentification.EventActionCodeSpecified = true;
			AuditMessage.EventIdentification.EventDateTime = Platform.Time.ToUniversalTime();
			AuditMessage.EventIdentification.EventOutcomeIndicator = outcome;

			InternalAddAuditSource(auditSource);

			InternalAddActiveDicomParticipant(sourceAE, sourceHost, destinationAE, destinationHost);

			InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
		}
Exemple #4
0
        public BeginTransferringDicomInstancesAuditHelper(DicomAuditSource auditSource, EventIdentificationTypeEventOutcomeIndicator outcome,
                                                          string sourceAE, string sourceHost, string destinationAE, string destinationHost,
                                                          AuditPatientParticipantObject patient)
            : base("BeginTransferringDicomInstances")
        {
            AuditMessage.EventIdentification                          = new EventIdentificationType();
            AuditMessage.EventIdentification.EventID                  = CodedValueType.BeginTransferringDICOMInstances;
            AuditMessage.EventIdentification.EventActionCode          = EventIdentificationTypeEventActionCode.E;
            AuditMessage.EventIdentification.EventActionCodeSpecified = true;
            AuditMessage.EventIdentification.EventDateTime            = Platform.Time.ToUniversalTime();
            AuditMessage.EventIdentification.EventOutcomeIndicator    = outcome;

            InternalAddAuditSource(auditSource);

            InternalAddActiveDicomParticipant(sourceAE, sourceHost, destinationAE, destinationHost);

            InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
        }
Exemple #5
0
        public BeginTransferringDicomInstancesAuditHelper(DicomAuditSource auditSource, EventIdentificationContentsEventOutcomeIndicator outcome,
                                                          AssociationParameters parms,
                                                          AuditPatientParticipantObject patient)
            : base("BeginTransferringDicomInstances")
        {
            AuditMessage.EventIdentification                          = new EventIdentificationContents();
            AuditMessage.EventIdentification.EventID                  = EventID.BeginTransferringDICOMInstances;
            AuditMessage.EventIdentification.EventActionCode          = EventIdentificationContentsEventActionCode.E;
            AuditMessage.EventIdentification.EventActionCodeSpecified = true;
            AuditMessage.EventIdentification.EventDateTime            = Platform.Time.ToUniversalTime();
            AuditMessage.EventIdentification.EventOutcomeIndicator    = outcome;

            InternalAddAuditSource(auditSource);

            InternalAddActiveDicomParticipant(parms);

            InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
        }
		public BeginTransferringDicomInstancesAuditHelper(DicomAuditSource auditSource, EventIdentificationTypeEventOutcomeIndicator outcome,
			AssociationParameters parms,
			AuditPatientParticipantObject patient)
			: base("BeginTransferringDicomInstances")
		{
			AuditMessage.EventIdentification = new EventIdentificationType();
			AuditMessage.EventIdentification.EventID = CodedValueType.BeginTransferringDICOMInstances;
			AuditMessage.EventIdentification.EventActionCode = EventIdentificationTypeEventActionCode.E;
			AuditMessage.EventIdentification.EventActionCodeSpecified = true;
			AuditMessage.EventIdentification.EventDateTime = Platform.Time.ToUniversalTime();
			AuditMessage.EventIdentification.EventOutcomeIndicator = outcome;

			InternalAddAuditSource(auditSource);

			InternalAddActiveDicomParticipant(parms);

			InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
		}
		public static void InstancesTransferredAuditLogger(DicomScpContext context, ServerAssociationParameters assocParams, List<StorageInstance> instances)
		{
			Dictionary<string, AuditPatientParticipantObject> list = new Dictionary<string, AuditPatientParticipantObject>();

			foreach (StorageInstance instance in instances)
			{
				string key = instance.PatientId + instance.PatientsName;
				if (!list.ContainsKey(key))
				{
					AuditPatientParticipantObject patient =
						new AuditPatientParticipantObject(instance.PatientsName, instance.PatientId);
					list.Add(key, patient);
				}
			}

			foreach (AuditPatientParticipantObject patient in list.Values)
			{
				// Audit Log
				DicomInstancesTransferredAuditHelper helper =
					new DicomInstancesTransferredAuditHelper(ServerPlatform.AuditSource,
					                                         EventIdentificationContentsEventOutcomeIndicator.Success,
					                                         EventIdentificationContentsEventActionCode.E,
					                                         assocParams);

				foreach (StorageInstance instance in instances)
				{
					if (patient.PatientId.Equals(instance.PatientId)
					    && patient.PatientsName.Equals(instance.PatientsName))
					{
						helper.AddStorageInstance(instance);
					}
				}

                ServerAuditHelper.LogAuditMessage(helper);
			}
		}
Exemple #8
0
 /// <summary>
 /// Add details of a Patient.
 /// </summary>
 /// <param name="patient"></param>
 public void AddPatientParticipantObject(AuditPatientParticipantObject patient)
 {
     InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
 }
		/// <summary>
		/// Add details of a Patient.
		/// </summary>
		/// <param name="study"></param>
		public void AddPatientParticipantObject(AuditPatientParticipantObject patient)
		{
			InternalAddParticipantObject(patient.PatientId + patient.PatientsName, patient);
		}
Exemple #10
0
 /// <summary>
 /// Enumerates the unique studies for a particular <paramref name="patient"/> in the collection.
 /// </summary>
 internal IEnumerable <AuditStudyParticipantObject> EnumerateStudies(AuditPatientParticipantObject patient)
 {
     return(EnumerateStudies(patient.PatientId, patient.PatientsName));
 }
		/// <summary>
		/// Add details of a Patient.
		/// </summary>
		/// <param name="patient"></param>
		public void AddPatientParticipantObject(AuditPatientParticipantObject patient)
		{
			// if the participant object contains no identifying information anyway, there's no need to add it to the audit message
			var key = patient.PatientId + patient.PatientsName;
			if (!string.IsNullOrEmpty(key))
				InternalAddParticipantObject(key, patient);
		}
Exemple #12
0
		/// <summary>
		/// Enumerates the unique studies for a particular <paramref name="patient"/> in the collection.
		/// </summary>
		internal IEnumerable<AuditStudyParticipantObject> EnumerateStudies(AuditPatientParticipantObject patient)
		{
			return EnumerateStudies(patient.PatientId, patient.PatientsName);
		}