Skip to content

Commit

Permalink
Audit services code cleanup #3262
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed Aug 22, 2024
1 parent f5a4b8e commit dce7619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -1288,10 +1287,10 @@ private String getLocalHostName(AuditLogger log) {
return log.getConnections().get(0).getHostname();
}

private Path toDirPath(AuditLogger auditLogger) throws UnsupportedEncodingException {
private Path toDirPath(AuditLogger auditLogger) {
return Paths.get(
StringUtils.replaceSystemProperties(getArchiveDevice().getAuditSpoolDirectory()),
URLEncoder.encode(auditLogger.getCommonName(), "UTF-8"));
URLEncoder.encode(auditLogger.getCommonName(), StandardCharsets.UTF_8));
}

private void writeSpoolFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.dcm4che3.audit.*;
import org.dcm4che3.hl7.HL7Segment;
import org.dcm4che3.net.audit.AuditLogger;
import org.dcm4che3.util.StringUtils;
import org.dcm4chee.arc.entity.Patient;

import java.text.ParsePosition;
Expand Down Expand Up @@ -153,22 +152,6 @@ static ParticipantObjectIdentification[] studyPatParticipants(
return studyPatParticipants;
}

static ParticipantObjectIdentification[] studyPatParticipants(
SpoolFileReader reader, AuditInfo auditInfo, AuditLogger auditLogger) {
ParticipantObjectIdentification[] studyPatParticipants = new ParticipantObjectIdentification[2];
String[] studyUIDs = StringUtils.split(auditInfo.getField(AuditInfo.STUDY_UID), ';');
studyPatParticipants[0] = studyPOI(studyUIDs[0])
.desc(participantObjDesc(auditInfo, reader.getInstanceLines(),
studyUIDs.length > 1 || auditInfo.getField(AuditInfo.OUTCOME) != null
|| auditLogger.isIncludeInstanceUID())
.pocsStudyUIDs(studyUIDs)
.build())
.lifeCycle(AuditMessages.ParticipantObjectDataLifeCycle.Verification)
.build();
studyPatParticipants[1] = patientPOIBuilder(auditInfo).build();
return studyPatParticipants;
}

static ParticipantObjectIdentificationBuilder studyPOI(String uid) {
return new ParticipantObjectIdentificationBuilder(
uid,
Expand Down

0 comments on commit dce7619

Please sign in to comment.