/** * This method is used to get information of Stem Cells for the form PHS398CoverPage * * @return StemCells object containing information about Human stem Cells involvement. */ private StemCells getStemCells() { StemCells stemCells = StemCells.Factory.newInstance(); YesNoDataType.Enum answer = null; ProposalYnq proposalYnq = getProposalYnQ(IS_HUMAN_STEM_CELLS_INVOLVED); if (proposalYnq != null) { if (proposalYnq.getAnswer() != null) { answer = getProposalYnQAnswer(proposalYnq); } stemCells.setIsHumanStemCellsInvolved(answer); if (YesNoDataType.Y_YES.equals(answer)) { String explanation = proposalYnq.getExplanation(); if (explanation != null) { if (S2SConstants.VALUE_UNKNOWN.equalsIgnoreCase(explanation)) { stemCells.setStemCellsIndicator(answer); } else { List<String> cellLines = getCellLines(explanation); if (cellLines.size() > 0) { stemCells.setCellLinesArray(cellLines.toArray(new String[0])); } } } } } return stemCells; }
/** * This method is used to get information of Stem Cells for the form PHS398CoverPage * * @return StemCells object containing information about Human stem Cells involvement. */ private StemCells getStemCells() { StemCells stemCells = StemCells.Factory.newInstance(); Enum answers = YesNoDataType.N_NO; String childAnswer = null; String answer = getAnswer(IS_HUMAN_STEM_CELLS_INVOLVED); if (answer != null) { if (!answer.equals(NOT_ANSWERED)) { answers = S2SConstants.PROPOSAL_YNQ_ANSWER_Y.equals(getAnswer(IS_HUMAN_STEM_CELLS_INVOLVED)) ? YesNoDataType.Y_YES : YesNoDataType.N_NO; if (S2SConstants.PROPOSAL_YNQ_ANSWER_Y.equals(answer)) { stemCells.setIsHumanStemCellsInvolved(YesNoDataType.Y_YES); String subAnswer = getAnswer(SPECIFIC_STEM_CELL_LINE); if (subAnswer != null) { if (!subAnswer.equals(NOT_ANSWERED)) { if (S2SConstants.PROPOSAL_YNQ_ANSWER_Y.equals(subAnswer)) { stemCells.setStemCellsIndicator(YesNoDataType.N_NO); childAnswer = getAnswers(REGISTRATION_NUMBER); } else { stemCells.setStemCellsIndicator(YesNoDataType.Y_YES); } } } if (childAnswer != null) { if (S2SConstants.VALUE_UNKNOWN.equalsIgnoreCase(childAnswer)) { stemCells.setStemCellsIndicator(answers); } else { List<String> cellLines = getCellLines(childAnswer); if (cellLines.size() > 0) { stemCells.setCellLinesArray(cellLines.toArray(new String[0])); } } } } else { stemCells.setIsHumanStemCellsInvolved(YesNoDataType.N_NO); } } } return stemCells; }