private void setProtocolSubmissionReviewers( org.kuali.kra.irb.actions.submit.ProtocolSubmissionLite protocolSubmission, SubmissionDetails protocolSubmissionDetail) { Collection<ProtocolReviewer> vecReviewers = getBusinessObjectService() .findMatching( ProtocolReviewer.class, Collections.singletonMap("submissionIdFk", protocolSubmission.getSubmissionId())); for (org.kuali.kra.protocol.actions.submit.ProtocolReviewer protocolReviewer : vecReviewers) { protocolReviewer.refreshNonUpdateableReferences(); edu.mit.irb.irbnamespace.ProtocolReviewerDocument.ProtocolReviewer protocolReviewerType = protocolSubmissionDetail.addNewProtocolReviewer(); setPerson((ProtocolReviewer) protocolReviewer, protocolReviewerType); protocolReviewerType.setReviewerTypeDesc( protocolReviewer.getProtocolReviewerType().getDescription()); protocolReviewerType.setReviewerTypeCode( new BigInteger(String.valueOf(protocolReviewer.getReviewerTypeCode()))); } }
private void setPerson( ProtocolReviewer protocolReviewer, edu.mit.irb.irbnamespace.ProtocolReviewerDocument.ProtocolReviewer protocolReviewerType) { Person personType = protocolReviewerType.addNewPerson(); boolean nonEmployeeFlag = protocolReviewer.getNonEmployeeFlag(); if (!nonEmployeeFlag) { String personId = protocolReviewer.getPersonId(); KcPerson person = getKcPersonService().getKcPersonByPersonId(personId); getIrbPrintXmlUtilService().setPersonXml(person, personType); } else { Rolodex rolodex = protocolReviewer.getRolodex(); ProtocolPersonRolodex protocolRolodex = getBusinessObjectService() .findBySinglePrimaryKey(ProtocolPersonRolodex.class, rolodex.getRolodexId()); getIrbPrintXmlUtilService().setPersonXml(protocolRolodex, personType); } }