Пример #1
0
  private void setSubmissionCheckListinfo(
      org.kuali.kra.irb.actions.submit.ProtocolSubmissionLite protocolSubmission,
      SubmissionDetails protocolSubmissionDetail) {
    SubmissionChecklistInfo submissionChecklistInfo =
        protocolSubmissionDetail.addNewSubmissionChecklistInfo();
    String formattedCode = new String();
    Collection<ProtocolExemptStudiesCheckListItem> protocolExemptCheckList =
        getBusinessObjectService()
            .findMatching(
                ProtocolExemptStudiesCheckListItem.class,
                Collections.singletonMap("submissionIdFk", protocolSubmission.getSubmissionId()));
    for (ProtocolExemptStudiesCheckListItem protocolExemptStudiesCheckListBean :
        protocolExemptCheckList) {
      Checklists checkListItem = submissionChecklistInfo.addNewChecklists();
      checkListItem.setChecklistCode(
          protocolExemptStudiesCheckListBean.getExemptStudiesCheckListCode());
      checkListItem.setChecklistDescription(
          protocolExemptStudiesCheckListBean.getExemptStudiesCheckListItem().getDescription());
      formattedCode =
          formattedCode
              + "("
              + protocolExemptStudiesCheckListBean.getExemptStudiesCheckListCode()
              + ") ";
    }
    if (formattedCode.length() > 0) {
      submissionChecklistInfo.setChecklistCodesFormatted(
          formattedCode); // this will have format (3) (7) like that...
    }
    Collection<ProtocolExpeditedReviewCheckListItem> vecExpeditedCheckList =
        getBusinessObjectService()
            .findMatching(
                ProtocolExpeditedReviewCheckListItem.class,
                Collections.singletonMap("submissionIdFk", protocolSubmission.getSubmissionId()));
    for (ProtocolExpeditedReviewCheckListItem protocolReviewTypeCheckListBean :
        vecExpeditedCheckList) {
      Checklists checkListItem = submissionChecklistInfo.addNewChecklists();
      checkListItem.setChecklistCode(
          protocolReviewTypeCheckListBean.getExpeditedReviewCheckListCode());
      checkListItem.setChecklistDescription(
          protocolReviewTypeCheckListBean.getExpeditedReviewCheckListItem().getDescription());
      formattedCode =
          formattedCode
              + "("
              + protocolReviewTypeCheckListBean.getExpeditedReviewCheckListCode()
              + ") ";
    }

    if (formattedCode.length() > 0) {
      submissionChecklistInfo.setChecklistCodesFormatted(
          formattedCode); // this will have format (3) (7) like that...
    }
  }
Пример #2
0
 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;
 }
Пример #3
0
  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())));
    }
  }
Пример #4
0
  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;
  }