Пример #1
0
  @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());
  }
Пример #2
0
  private boolean canPerform(ProtocolAction lastAction, ProtocolSubmission lastSubmission) {
    boolean canPerform = false;

    if (lastAction != null && lastSubmission != null) {

      boolean traditionalSubPerform =
          ProtocolActionType.RECORD_COMMITTEE_DECISION.equals(
                  lastAction.getProtocolActionTypeCode())
              && CommitteeDecisionMotionType.SPECIFIC_MINOR_REVISIONS.equals(
                  lastSubmission.getCommitteeDecisionMotionTypeCode());

      boolean exemptExpeditePerform = false;
      if (lastSubmission.getProtocolReviewType() != null) {
        exemptExpeditePerform =
            isExpeditedOrExempt(lastSubmission.getProtocolReviewType().getReviewTypeCode())
                && ProtocolActionType.SUBMIT_TO_IRB.equals(lastAction.getProtocolActionTypeCode());
      }

      canPerform = traditionalSubPerform || exemptExpeditePerform;
    }

    return canPerform;
  }