/** * @see org.kuali.kra.irb.auth.ProtocolAuthorizer#isAuthorized(java.lang.String, * org.kuali.kra.irb.auth.ProtocolTask) */ public boolean isAuthorized(String username, ProtocolTask task) { Protocol protocol = task.getProtocol(); return kraWorkflowService.isInWorkflow(protocol.getProtocolDocument()) && isPendingOrSubmittedToCommittee(protocol) && isInSchedule(protocol) && hasPermission(username, protocol, PermissionConstants.PERFORM_IRB_ACTIONS_ON_PROTO); }
public ProtocolDocument getDeferredVersionedDocument(Protocol protocol) throws Exception { getDocumentService() .cancelDocument( protocol.getProtocolDocument(), "Protocol document cancelled - protocol has been deferred."); getProtocolOnlineReviewService() .cancelOnlineReviews( protocol.getProtocolSubmission(), "Protocol Review cancelled - protocol has been deferred."); ProtocolDocument newDocument = (ProtocolDocument) getVersionedDocument(protocol); setReferencesForProtocolCorrespondence(newDocument); ProtocolAction assignToAgendaProtocolAction = (ProtocolAction) getProtocolAssignToAgendaService() .getAssignedToAgendaProtocolAction((Protocol) newDocument.getProtocol()); if (assignToAgendaProtocolAction != null) { newDocument.getProtocol().getProtocolActions().remove(assignToAgendaProtocolAction); getBusinessObjectService().delete(assignToAgendaProtocolAction); } newDocument.getProtocol().refreshReferenceObject("protocolStatus"); getDocumentService().saveDocument(newDocument); return newDocument; }
@Test public void testAddProtocolParticipant() { ProtocolParticipant protocolParticipant = new ProtocolParticipant(); protocolParticipant.setParticipantTypeCode("4"); final ProtocolParticipantServiceImpl protocolParticipantService = new ProtocolParticipantServiceImpl(); protocolParticipantService.addProtocolParticipant(protocol, protocolParticipant); int participantSize = protocol.getProtocolParticipants().size(); assertTrue("participant size is " + participantSize, participantSize == 4); String participantCode1 = protocol.getProtocolParticipant(0).getParticipantTypeCode(); assertTrue( "participant type code of participant 1 is " + participantCode1, "1".equals(participantCode1)); String participantCode2 = protocol.getProtocolParticipant(1).getParticipantTypeCode(); assertTrue( "participant type code of participant 2 is " + participantCode2, "2".equals(participantCode2)); String participantCode3 = protocol.getProtocolParticipant(2).getParticipantTypeCode(); assertTrue( "participant type code of participant 3 is " + participantCode3, "3".equals(participantCode3)); String participantCode4 = protocol.getProtocolParticipant(3).getParticipantTypeCode(); assertTrue( "participant type code of participant 4 is " + participantCode4, "4".equals(participantCode4)); }
@Before public void setUp() { ProtocolParticipant protocolParticipant1 = new ProtocolParticipant(); protocolParticipant1.setParticipantTypeCode("1"); protocolParticipant1.setParticipantCount(15); ProtocolParticipant protocolParticipant2 = new ProtocolParticipant(); protocolParticipant2.setParticipantTypeCode("2"); protocolParticipant2.setParticipantCount(25); ProtocolParticipant protocolParticipant3 = new ProtocolParticipant(); protocolParticipant3.setParticipantTypeCode("3"); protocolParticipant3.setParticipantCount(35); protocol = new Protocol() { @Override public void refreshReferenceObject(String referenceObjectName) {} }; protocol.setProtocolParticipants(new ArrayList<ProtocolParticipant>()); protocol.getProtocolParticipants().add(protocolParticipant1); protocol.getProtocolParticipants().add(protocolParticipant2); protocol.getProtocolParticipants().add(protocolParticipant3); }
/** * @throws WorkflowException * @see * org.kuali.kra.irb.actions.notifycommittee.ProtocolNotifyCommitteeService#submitCommitteeNotification(org.kuali.kra.irb.Protocol, * org.kuali.kra.irb.actions.notifycommittee.ProtocolNotifyCommitteeBean) */ public void submitCommitteeNotification( Protocol protocol, ProtocolNotifyCommitteeBean notifyCommitteeBean) throws WorkflowException { // we do not create a new submission here unlike in notify IRB ProtocolAction protocolAction = new ProtocolAction(protocol, null, ProtocolActionType.NOTIFIED_COMMITTEE); protocolAction.setComments(notifyCommitteeBean.getComment()); protocolAction.setActionDate(new Timestamp(notifyCommitteeBean.getActionDate().getTime())); protocol.getProtocolActions().add(protocolAction); protocolActionService.updateProtocolStatus(protocolAction, protocol); documentService.saveDocument(protocol.getProtocolDocument()); }
/** * {@inheritDoc} * * @see * org.kuali.kra.common.specialreview.service.SpecialReviewService#getViewSpecialReviewProtocolRouteHeaderId(java.lang.String) */ public Long getViewSpecialReviewProtocolRouteHeaderId(String protocolNumber) throws Exception { Long routeHeaderId = 0L; if (StringUtils.isNotBlank(protocolNumber)) { Protocol protocol = getProtocolFinderDao().findCurrentProtocolByNumber(protocolNumber); if (protocol != null) { Document document = getDocumentService() .getByDocumentHeaderId(protocol.getProtocolDocument().getDocumentNumber()); routeHeaderId = document.getDocumentHeader().getWorkflowDocument().getRouteHeaderId(); } } return routeHeaderId; }
@Test public void testGetProtocolVersion() throws Exception { Protocol protocol = (Protocol) protocolVersionService.getProtocolVersion(PROTOCOL_NUMBER, 1); assertNull(protocol); ProtocolDocument protocolDocument1 = ProtocolFactory.createProtocolDocument(PROTOCOL_NUMBER); ProtocolDocument protocolDocument2 = (ProtocolDocument) protocolVersionService.versionProtocolDocument(protocolDocument1); ProtocolDocument protocolDocument3 = (ProtocolDocument) protocolVersionService.versionProtocolDocument(protocolDocument2); protocol = (Protocol) protocolVersionService.getProtocolVersion(PROTOCOL_NUMBER, 2); assertNotNull(protocol); assertEquals(new Integer(2), protocol.getSequenceNumber()); }
/** * @see * org.kuali.kra.irb.protocol.location.ProtocolLocationService#addDefaultProtocolLocation(org.kuali.kra.irb.Protocol) */ public void addDefaultProtocolLocation(Protocol protocol) { if (protocol.getProtocolLocations().size() == 0) { ProtocolLocation protocolLocation = new ProtocolLocation(); protocolLocation.setProtocolNumber(PROTOCOL_NUMBER); protocolLocation.setSequenceNumber(SEQUENCE_NUMBER); Organization organization = getOrganization(Constants.DEFAULT_PROTOCOL_ORGANIZATION_ID); protocolLocation.setOrganization(organization); protocolLocation.setOrganizationId(organization.getOrganizationId()); protocolLocation.setRolodexId(organization.getContactAddressId()); protocolLocation.setProtocolOrganizationTypeCode( Constants.DEFAULT_PROTOCOL_ORGANIZATION_TYPE_CODE); protocolLocation.refreshReferenceObject(REFERENCE_PROTOCOL_ORGANIZATION_TYPE); protocolLocation.refreshReferenceObject(REFERENCE_ROLODEX); protocol.getProtocolLocations().add(protocolLocation); } }
protected void setReferencesForProtocolCorrespondence(ProtocolDocument newDocument) { Protocol newProtocol = newDocument.getProtocol(); newProtocol .getProtocolActions() .forEach( protocolAction -> { protocolAction.setSequenceNumber(newProtocol.getSequenceNumber()); protocolAction .getProtocolCorrespondences() .forEach( protocolCorrespondence -> { protocolCorrespondence.setProtocolId(newProtocol.getProtocolId()); protocolCorrespondence.setSequenceNumber(newProtocol.getSequenceNumber()); }); }); }
public void populateProposalPerson_Investigator( Protocol protocol, ProposalDevelopmentDocument proposalDocument) { ProposalPerson proposalPerson = new ProposalPerson(); proposalPerson.setPersonId(protocol.getPrincipalInvestigatorId()); PersonEditableService personEditableService = KraServiceLocator.getService(PersonEditableService.class); personEditableService.populateContactFieldsFromPersonId(proposalPerson); proposalPerson.setProposalPersonRoleId(Constants.PRINCIPAL_INVESTIGATOR_ROLE); proposalPerson.setDevelopmentProposal(proposalDocument.getDevelopmentProposal()); proposalPerson.setProposalNumber(proposalDocument.getDevelopmentProposal().getProposalNumber()); proposalPerson.setProposalPersonNumber(new Integer(1)); proposalPerson.setOptInUnitStatus("Y"); proposalPerson.setOptInCertificationStatus("Y"); proposalDocument.getDevelopmentProposal().getProposalPersons().add(proposalPerson); KeyPersonnelService keyPersonnelService = (KeyPersonnelServiceImpl) KraServiceLocator.getService(KeyPersonnelService.class); keyPersonnelService.populateProposalPerson(proposalPerson, proposalDocument); keyPersonnelService.assignLeadUnit( proposalPerson, proposalDocument.getDevelopmentProposal().getOwnedByUnitNumber()); }
/** * {@inheritDoc} * * @see * org.kuali.kra.common.specialreview.service.SpecialReviewService#deleteProtocolFundingSourceForSpecialReview(java.lang.String, * java.lang.String, java.lang.String) */ public void deleteProtocolFundingSourceForSpecialReview( String protocolNumber, String fundingSourceNumber, String fundingSourceTypeCode) { Protocol protocol = getProtocolFinderDao().findCurrentProtocolByNumber(protocolNumber); if (protocol != null) { List<ProtocolFundingSource> deletedProtocolFundingSources = new ArrayList<ProtocolFundingSource>(); for (ProtocolFundingSource protocolFundingSource : protocol.getProtocolFundingSources()) { if (StringUtils.equals(protocolFundingSource.getFundingSourceNumber(), fundingSourceNumber) && StringUtils.equals( protocolFundingSource.getFundingSourceTypeCode(), fundingSourceTypeCode)) { deletedProtocolFundingSources.add(protocolFundingSource); } } getBusinessObjectService().delete(deletedProtocolFundingSources); } }
protected void populateProposalSpecialReview( Protocol protocol, ProposalDevelopmentDocument proposalDocument) { if (protocol != null) { Integer specialReviewNumber = proposalDocument.getDocumentNextValue(Constants.SPECIAL_REVIEW_NUMBER); ProposalSpecialReview specialReview = new ProposalSpecialReview(); specialReview.setSpecialReviewNumber(specialReviewNumber); specialReview.setSpecialReviewTypeCode(SpecialReviewType.HUMAN_SUBJECTS); specialReview.setApprovalTypeCode(SpecialReviewApprovalType.PENDING); specialReview.setProtocolNumber(protocol.getProtocolNumber()); specialReview.setDevelopmentProposal(proposalDocument.getDevelopmentProposal()); specialReview.setProtocolStatus(protocol.getProtocolStatus().getDescription()); specialReview.setComments(ComplianceConstants.NEW_SPECIAL_REVIEW_COMMENT); proposalDocument.getDevelopmentProposal().getPropSpecialReviews().add(specialReview); } }
protected void populateRequiredFields( Protocol protocol, ProposalDevelopmentDocument proposalDocument) throws Exception { DevelopmentProposal developmentProposal = proposalDocument.getDevelopmentProposal(); developmentProposal.setTitle(protocol.getTitle()); developmentProposal.setOwnedByUnit(protocol.getLeadUnit().getUnit()); developmentProposal.setOwnedByUnitNumber(protocol.getLeadUnitNumber()); developmentProposal.setRequestedStartDateInitial(new Date(System.currentTimeMillis())); ParameterService parameterService = KraServiceLocator.getService(ParameterService.class); String projectEndDateParameter = parameterService.getParameterValueAsString( ProtocolDocument.class, ProtocolProposalDevelopmentDocumentService.PROJECT_END_DATE_NUMBER_OF_YEARS); int numberOfYears = Integer.parseInt(projectEndDateParameter); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.YEAR, numberOfYears); calendar.add(Calendar.DATE, -1); Date projectEndDate = new Date(calendar.getTimeInMillis()); developmentProposal.setRequestedEndDateInitial(projectEndDate); String activityTypeCode = ProposalDevelopmentUtils.getProposalDevelopmentDocumentParameter( ProposalDevelopmentUtils.ACTIVITY_TYPE_CODE_RESEARCH_PARM); String proposalTypeCode = ProposalDevelopmentUtils.getProposalDevelopmentDocumentParameter( ProposalDevelopmentUtils.PROPOSAL_TYPE_CODE_NEW_PARM); developmentProposal.setActivityTypeCode(activityTypeCode); developmentProposal.setProposalTypeCode(proposalTypeCode); // find sponsor from funding source List<ProtocolFundingSourceBase> protocolFundingSources = protocol.getProtocolFundingSources(); ProtocolFundingSource sponsorProtocolFundingSource = null; for (ProtocolFundingSourceBase protocolFundingSource : protocolFundingSources) { if (protocolFundingSource.isSponsorFunding()) { sponsorProtocolFundingSource = (ProtocolFundingSource) protocolFundingSource; break; } } if (sponsorProtocolFundingSource != null) { developmentProposal.setSponsorCode(sponsorProtocolFundingSource.getFundingSourceNumber()); } }
/** Verfy that the protocol has the given protocol action. */ @SuppressWarnings("unchecked") private void verifyProtocolAction(Protocol protocol, String actionTypeCode) { List<ProtocolAction> actions = (List) protocol.getProtocolActions(); for (ProtocolAction action : actions) { if (StringUtils.equals(actionTypeCode, action.getProtocolActionTypeCode())) { return; } } assertTrue(actionTypeCode + " not found", false); }
/** * @see * org.kuali.kra.irb.protocol.location.ProtocolLocationService#addProtocolLocation(org.kuali.kra.irb.Protocol, * org.kuali.kra.irb.protocol.location.ProtocolLocation) */ public void addProtocolLocation(Protocol protocol, ProtocolLocation protocolLocation) { // TODO Framework problem of 2 saves protocolLocation.setProtocolNumber(PROTOCOL_NUMBER); protocolLocation.setSequenceNumber(SEQUENCE_NUMBER); protocolLocation.refreshReferenceObject(REFERENCE_PROTOCOL_ORGANIZATION_TYPE); protocolLocation.refreshReferenceObject(REFERENCE_ORGANIZATION); protocolLocation.setRolodexId(protocolLocation.getOrganization().getContactAddressId()); protocolLocation.refreshReferenceObject(REFERENCE_ROLODEX); protocol.getProtocolLocations().add(protocolLocation); }
/** * Find the submission. It is the submission that is either currently pending or already submitted * to a committee. * * @param protocol * @return */ private ProtocolSubmission findSubmission(Protocol protocol) { for (ProtocolSubmission submission : protocol.getProtocolSubmissions()) { if (StringUtils.equals(submission.getSubmissionStatusCode(), ProtocolSubmissionStatus.PENDING) || StringUtils.equals( submission.getSubmissionStatusCode(), ProtocolSubmissionStatus.SUBMITTED_TO_COMMITTEE)) { return submission; } } return null; }
/** * {@inheritDoc} * * @see * org.kuali.kra.common.specialreview.service.SpecialReviewService#isLinkedToProtocolFundingSource(java.lang.String, * java.lang.String, java.lang.String) */ public boolean isLinkedToProtocolFundingSource( String protocolNumber, String fundingSourceNumber, String fundingSourceTypeCode) { boolean isLinkedToProtocolFundingSource = false; if (StringUtils.isNotBlank(protocolNumber)) { Protocol protocol = getProtocolFinderDao().findCurrentProtocolByNumber(protocolNumber); if (protocol != null) { for (ProtocolFundingSource protocolFundingSource : protocol.getProtocolFundingSources()) { if (StringUtils.equals( protocolFundingSource.getFundingSourceNumber(), fundingSourceNumber) && StringUtils.equals( protocolFundingSource.getFundingSourceTypeCode(), fundingSourceTypeCode)) { isLinkedToProtocolFundingSource = true; break; } } } } return isLinkedToProtocolFundingSource; }
@Test public void testProcessApproveCommitteeDecision() throws Exception { Protocol protocol = getProtocolAssignedToAgenda(); CommitteeDecision committeeDecision = getMockCommitteeDecisionBean(CommitteeDecisionMotionType.APPROVE); service.processCommitteeDecision(protocol, committeeDecision); ProtocolAction lastAction = protocol.getLastProtocolAction(); assertNotNull(lastAction); assertEquals( ProtocolActionType.RECORD_COMMITTEE_DECISION, lastAction.getProtocolActionTypeCode()); ProtocolSubmission submission = protocol.getProtocolSubmission(); assertNotNull(submission); assertEquals( CommitteeDecisionMotionType.APPROVE, submission.getCommitteeDecisionMotionTypeCode()); assertEquals(YES_COUNT, submission.getYesVoteCount()); assertEquals(NO_COUNT, submission.getNoVoteCount()); assertEquals(ABSTAIN_COUNT, submission.getAbstainerCount()); assertEquals(RECUSED_COUNT, submission.getRecusedCount()); assertEquals(VOTING_COMMENTS, submission.getVotingComments()); }
protected void populateDocumentOverview( Protocol protocol, ProposalDevelopmentDocument proposalDocument) { ProtocolDocument protocolDocument = (ProtocolDocument) protocol.getProtocolDocument(); DocumentHeader proposalDocumentHeader = proposalDocument.getDocumentHeader(); DocumentHeader protocolDocumentHeader = protocolDocument.getDocumentHeader(); proposalDocumentHeader.setDocumentDescription( "PD - " + protocolDocumentHeader.getDocumentDescription()); proposalDocumentHeader.setExplanation( "Document created from Protocol - " + protocolDocument.getDocumentNumber()); proposalDocumentHeader.setOrganizationDocumentNumber( protocolDocumentHeader.getOrganizationDocumentNumber()); }
/** * {@inheritDoc} * * @see * org.kuali.kra.common.specialreview.service.SpecialReviewService#addProtocolFundingSourceForSpecialReview(java.lang.String, * java.lang.String, java.lang.String, java.lang.String, java.lang.String) */ public void addProtocolFundingSourceForSpecialReview( String protocolNumber, String fundingSourceNumber, String fundingSourceTypeCode, String fundingSourceName, String fundingSourceTitle) { Protocol protocol = getProtocolFinderDao().findCurrentProtocolByNumber(protocolNumber); if (protocol != null && StringUtils.isNotBlank(fundingSourceNumber) && NumberUtils.isNumber(fundingSourceTypeCode)) { ProtocolFundingSource protocolFundingSource = new ProtocolFundingSource(); protocolFundingSource.setProtocolNumber(protocolNumber); protocolFundingSource.setFundingSourceNumber(fundingSourceNumber); protocolFundingSource.setFundingSourceTypeCode(fundingSourceTypeCode); protocolFundingSource.setFundingSourceName(fundingSourceName); protocolFundingSource.setFundingSourceTitle(fundingSourceTitle); protocol.getProtocolFundingSources().add(protocolFundingSource); getBusinessObjectService().save(protocol); } }
private ProtocolAction findProtocolActionForSubmission( org.kuali.kra.irb.actions.submit.ProtocolSubmissionLite protocolSubmission, Protocol protocol) { List<ProtocolActionBase> protocolActions = protocol.getProtocolActions(); for (ProtocolActionBase protocolAction : protocolActions) { if (protocolAction.getSubmissionNumber() != null && protocolAction .getSubmissionNumber() .equals(protocolSubmission.getSubmissionNumber())) { return (ProtocolAction) protocolAction; } } return null; }
@Override public void close(Protocol protocol, ProtocolGenericActionBean actionBean) throws Exception { if (ProtocolActionType.REQUEST_TO_CLOSE.equals( protocol.getLastProtocolAction().getProtocolActionType().getProtocolActionTypeCode())) { // if previous action is request to close then the new status is closed by investigator performGenericAction( protocol, actionBean, ProtocolActionType.CLOSED_ADMINISTRATIVELY_CLOSED, ProtocolStatus.CLOSED_BY_INVESTIGATOR); } else { // else closed administratively performGenericAction( protocol, actionBean, ProtocolActionType.CLOSED_ADMINISTRATIVELY_CLOSED, ProtocolStatus.CLOSED_ADMINISTRATIVELY); } }
private void performGenericAction( Protocol protocol, ProtocolGenericActionBean actionBean, String protocolActionType) throws Exception { ProtocolAction protocolAction = (ProtocolAction) createProtocolActionAndAttach(protocol, actionBean, protocolActionType); if (protocol.getNotifyIrbSubmissionId() == null) { getProtocolActionService().updateProtocolStatus(protocolAction, protocol); } else { for (ProtocolSubmissionBase submission : protocol.getProtocolSubmissions()) { if (submission.getSubmissionId().equals(protocol.getNotifyIrbSubmissionId())) { submission.setSubmissionStatusCode(ProtocolSubmissionStatus.IRB_ACKNOWLEDGEMENT); } } } protocol.refreshReferenceObject("protocolStatus"); protocol.refreshReferenceObject("protocolSubmission"); getDocumentService().saveDocument(protocol.getProtocolDocument()); }
/** * @see * org.kuali.kra.irb.protocol.location.ProtocolLocationService#clearProtocolLocation(org.kuali.kra.irb.Protocol, * int) */ public void clearProtocolLocationAddress(Protocol protocol, int lineNumber) { protocol.getProtocolLocations().get(lineNumber).setRolodexId(new Integer(0)); protocol.getProtocolLocations().get(lineNumber).setRolodex(new Rolodex()); }
private boolean isStatusValid(Protocol protocol) { String submissionStatusCode = protocol.getProtocolSubmission().getSubmissionStatus().getProtocolSubmissionStatusCode(); return StringUtils.isNotBlank(submissionStatusCode) && (ProtocolSubmissionStatus.SUBMITTED_TO_COMMITTEE.equals(submissionStatusCode)); }
public Schedule getSchedule(CommitteeSchedule committeeSchedule) { Schedule schedule = Schedule.Factory.newInstance(); setScheduleMasterData(committeeSchedule, schedule.addNewScheduleMasterData()); PreviousSchedule prevSchedule = schedule.addNewPreviousSchedule(); setPreviousSchedule(committeeSchedule, prevSchedule.addNewScheduleMasterData()); NextSchedule nextScheduleType = schedule.addNewNextSchedule(); setNextSchedule(committeeSchedule, nextScheduleType.addNewScheduleMasterData()); getIrbPrintXmlUtilService().setMinutes(committeeSchedule, schedule); setAttendance(committeeSchedule, schedule); committeeSchedule.refreshReferenceObject("protocolSubmissions"); List<org.kuali.kra.irb.actions.submit.ProtocolSubmissionLite> submissions = committeeSchedule.getLatestProtocolSubmissions(); for (org.kuali.kra.irb.actions.submit.ProtocolSubmissionLite protocolSubmission : submissions) { ProtocolSubmission protocolSubmissionType = schedule.addNewProtocolSubmission(); SubmissionDetails protocolSubmissionDetail = protocolSubmissionType.addNewSubmissionDetails(); ProtocolSummary protocolSummary = protocolSubmissionType.addNewProtocolSummary(); ProtocolMasterData protocolMaster = protocolSummary.addNewProtocolMasterData(); String followUpAction = null; String actionTypeCode = null; Protocol protocol = getBusinessObjectService() .findByPrimaryKey( Protocol.class, Collections.singletonMap("protocolId", protocolSubmission.getProtocolId())); List<ProtocolActionBase> protocolActions = protocol.getProtocolActions(); for (ProtocolActionBase protocolAction : protocolActions) { actionTypeCode = protocolAction.getProtocolActionTypeCode(); if (actionTypeCode.equals(EXPEDIT_ACTION_TYPE_CODE) || actionTypeCode.equals(EXEMPT_ACTION_TYPE_CODE)) { if (protocolAction.getFollowupActionCode() != null && protocolAction.getFollowupActionCode().equals(FOLLOW_UP_ACTION_CODE)) { followUpAction = protocolAction.getFollowupActionCode(); } break; } } protocolMaster.setProtocolNumber(protocol.getProtocolNumber()); protocolMaster.setSequenceNumber( new BigInteger(String.valueOf(protocol.getSequenceNumber()))); protocolMaster.setProtocolTitle(protocol.getTitle()); protocolMaster.setProtocolStatusCode( new BigInteger(String.valueOf(protocol.getProtocolStatusCode()))); protocolMaster.setProtocolStatusDesc(protocol.getProtocolStatus().getDescription()); protocolMaster.setProtocolTypeCode( new BigInteger(String.valueOf(protocol.getProtocolTypeCode()))); protocolMaster.setProtocolTypeDesc(protocol.getProtocolType().getDescription()); if (protocol.getDescription() != null) { protocolMaster.setProtocolDescription(protocol.getDescription()); } if (protocol.getApprovalDate() != null) { protocolMaster.setApprovalDate( getDateTimeService().getCalendar(protocol.getApprovalDate())); } if (protocol.getExpirationDate() != null) { protocolMaster.setExpirationDate( getDateTimeService().getCalendar(protocol.getExpirationDate())); } if (protocol.getFdaApplicationNumber() != null) { protocolMaster.setFdaApplicationNumber(protocol.getFdaApplicationNumber()); } if (protocol.getReferenceNumber1() != null) { protocolMaster.setRefNumber1(protocol.getReferenceNumber1()); } if (protocol.getReferenceNumber2() != null) { protocolMaster.setRefNumber2(protocol.getReferenceNumber2()); } protocolSubmissionDetail.setProtocolNumber(protocolSubmission.getProtocolNumber()); if (protocolSubmission.getProtocolSubmissionType() != null) { protocolSubmissionDetail.setSubmissionTypeDesc( protocolSubmission.getProtocolSubmissionType().getDescription()); } if (protocolSubmission.getProtocolReviewTypeCode() != null) { protocolSubmissionDetail.setProtocolReviewTypeCode( new BigInteger(protocolSubmission.getProtocolReviewTypeCode())); } if (protocolSubmission.getProtocolReviewType() != null) { protocolSubmissionDetail.setProtocolReviewTypeDesc( protocolSubmission.getProtocolReviewType().getDescription()); } if (protocolSubmission.getSubmissionTypeCode() != null) { protocolSubmissionDetail.setSubmissionTypeCode( new BigInteger(String.valueOf(protocolSubmission.getSubmissionTypeCode()))); } if (protocolSubmission.getProtocolSubmissionType() != null) { protocolSubmissionDetail.setSubmissionTypeDesc( protocolSubmission.getProtocolSubmissionType().getDescription()); } if (protocolSubmission.getSubmissionNumber() != null) { protocolSubmissionDetail.setSubmissionNumber( new BigInteger(String.valueOf(protocolSubmission.getSubmissionNumber()))); } if (protocolSubmission.getSubmissionStatusCode() != null) { protocolSubmissionDetail.setSubmissionStatusCode( new BigInteger(String.valueOf(protocolSubmission.getSubmissionStatusCode()))); } if (protocolSubmission.getSubmissionStatus() != null) { protocolSubmissionDetail.setSubmissionStatusDesc( protocolSubmission.getSubmissionStatus().getDescription()); } if (protocolSubmission.getSubmissionTypeQualifierCode() != null) { protocolSubmissionDetail.setSubmissionTypeQualifierCode( new BigInteger(protocolSubmission.getSubmissionTypeQualifierCode())); } if (protocolSubmission.getProtocolSubmissionQualifierType() != null) { protocolSubmissionDetail.setSubmissionTypeQualifierDesc( protocolSubmission.getProtocolSubmissionQualifierType().getDescription()); } if (protocolSubmission.getYesVoteCount() != null) { protocolSubmissionDetail.setYesVote( BigInteger.valueOf(protocolSubmission.getYesVoteCount())); } else { protocolSubmissionDetail.setYesVote(BigInteger.ZERO); } if (protocolSubmission.getNoVoteCount() != null) { protocolSubmissionDetail.setNoVote(BigInteger.valueOf(protocolSubmission.getNoVoteCount())); } else { protocolSubmissionDetail.setNoVote(BigInteger.ZERO); } if (protocolSubmission.getAbstainerCount() != null) { protocolSubmissionDetail.setAbstainerCount( BigInteger.valueOf(protocolSubmission.getAbstainerCount())); } else { protocolSubmissionDetail.setAbstainerCount(BigInteger.ZERO); } protocolSubmissionDetail.setVotingComments(protocolSubmission.getVotingComments()); setProtocolSubmissionAction(protocolSubmission, protocol, protocolSubmissionDetail); if (protocolSubmission.getSubmissionDate() != null) { protocolSubmissionDetail.setSubmissionDate( getDateTimeService().getCalendar(protocolSubmission.getSubmissionDate())); } setSubmissionCheckListinfo(protocolSubmission, protocolSubmissionDetail); setProtocolSubmissionReviewers(protocolSubmission, protocolSubmissionDetail); List<ProtocolPersonBase> protocolPersons = protocol.getProtocolPersons(); for (ProtocolPersonBase protocolPerson : protocolPersons) { if (protocolPerson .getProtocolPersonRoleId() .equals(ProtocolPersonRole.ROLE_PRINCIPAL_INVESTIGATOR) || protocolPerson .getProtocolPersonRoleId() .equals(ProtocolPersonRole.ROLE_CO_INVESTIGATOR)) { Investigator investigator = protocolSummary.addNewInvestigator(); getIrbPrintXmlUtilService() .setPersonRolodexType((ProtocolPerson) protocolPerson, investigator.addNewPerson()); if (protocolPerson .getProtocolPersonRoleId() .equals(ProtocolPersonRole.ROLE_PRINCIPAL_INVESTIGATOR)) { investigator.setPIFlag(true); } } } List<ProtocolRiskLevel> cvRiskLevels = protocol.getProtocolRiskLevels(); for (ProtocolRiskLevel protocolRiskLevelBean : cvRiskLevels) { edu.mit.irb.irbnamespace.ProtocolSummaryDocument.ProtocolSummary.RiskLevels riskLevelType = protocolSummary.addNewRiskLevels(); riskLevelType.setRiskLevelDescription( protocolRiskLevelBean.getRiskLevel().getDescription()); riskLevelType.setComments(protocolRiskLevelBean.getComments()); } List<ProtocolFundingSource> vecFundingSource = (List) protocol.getProtocolFundingSources(); int fundingSourceTypeCode; String fundingSourceName, fundingSourceCode; for (ProtocolFundingSource protocolFundingSourceBean : vecFundingSource) { protocolFundingSourceBean.refreshNonUpdateableReferences(); edu.mit.irb.irbnamespace.ProtocolSummaryDocument.ProtocolSummary.FundingSource fundingSource = protocolSummary.addNewFundingSource(); fundingSourceCode = protocolFundingSourceBean.getFundingSourceNumber(); fundingSourceTypeCode = Integer.valueOf(protocolFundingSourceBean.getFundingSourceTypeCode()); fundingSourceName = getFundingSourceNameForType(fundingSourceTypeCode, fundingSourceCode); fundingSource.setFundingSourceName(fundingSourceName); if (protocolFundingSourceBean.getFundingSourceType() != null) { fundingSource.setTypeOfFundingSource( protocolFundingSourceBean.getFundingSourceType().getDescription()); } } getIrbPrintXmlUtilService() .setProcotolMinutes(committeeSchedule, protocolSubmission, protocolSubmissionType); } setOtherActionItems(committeeSchedule, schedule); return schedule; }