/** * @param patientId patient ID * @param patientName patient name * @return this */ public DicomInstancesAccessedBuilder setPatientParticipantObject(String patientId, String patientName) { if (patientId != null) { addPatientParticipantObject(patientId, patientName, Collections.emptyList(), null); } return self(); }
public DicomInstancesAccessedBuilder(EventOutcomeIndicator outcome, String eventOutcomeDescription, EventActionCode eventActionCode, EventType eventType, PurposeOfUse... purposesOfUse) { super(); setEventIdentification(outcome, eventOutcomeDescription, eventActionCode, EventIdCode.DICOMInstancesAccessed, eventType, purposesOfUse ); }
@Override public void validate() { super.validate(); int participants = getMessage().getActiveParticipants().size(); if (participants < 1 || participants > 2) { throw new AuditException("Must have one or two ActiveParticipants"); } if (getMessage().findParticipantObjectIdentifications(poi -> poi.getParticipantObjectIDTypeCode() == ParticipantObjectIdTypeCode.StudyInstanceUID).isEmpty()) { throw new AuditException("Must have one or more ParticipantObjectIdentification with ParticipantObjectIDTypeCode StudyInstanceUID"); } if (getMessage().findParticipantObjectIdentifications(poi -> poi.getParticipantObjectIDTypeCode() == ParticipantObjectIdTypeCode.PatientNumber).size() != 1) { throw new AuditException("Must one ParticipantObjectIdentification with ParticipantObjectIDTypeCode PatientNumber"); } } }