ap.getRoleIDCode().add(roleID);
return ap;
}
public AuditSourceIdentification createAuditSourceIdentification() {
AuditSourceIdentification asi = new AuditSourceIdentification();
asi.setAuditSourceID(auditSourceID());
if (auditEnterpriseSiteID != null) {
if (auditEnterpriseSiteID.equals("dicomInstitutionName")) {
String[] institutionNames = getDevice().getInstitutionNames();
if (institutionNames.length > 0)
asi.setAuditEnterpriseSiteID(institutionNames[0]);
} else
asi.setAuditEnterpriseSiteID(auditEnterpriseSiteID);
}
for (String code : auditSourceTypeCodes) {
if (code.equals("dicomPrimaryDeviceType")) {
for (String type : device.getPrimaryDeviceTypes()) {
AuditSourceTypeCode astc = new AuditSourceTypeCode();
astc.setCode(type);
astc.setCodeSystemName("DCM");
asi.getAuditSourceTypeCode().add(astc);
}
} else {
AuditSourceTypeCode astc = new AuditSourceTypeCode();
astc.setCode(code);
asi.getAuditSourceTypeCode().add(astc );
}
}
return asi ;
}