private String getCycleValue(ChemotherapyDetailsVo voChemotherapyDetails) { if (ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue()) return ""; int maxCycleNum = 0; if(voChemotherapyDetails.getCCOCycleDetailsIsNotNull() && voChemotherapyDetails.getCCOCycleDetails().size() > 0 && voChemotherapyDetails.getCCOCycleDetails().get(0).getCycleNumber() != null && voChemotherapyDetails.getCCOCycleDetails().get(0).getIsActiveIsNotNull() && voChemotherapyDetails.getCCOCycleDetails().get(0).getIsActive()) maxCycleNum = voChemotherapyDetails.getCCOCycleDetails().get(0).getCycleNumber(); for (int j = 0; voChemotherapyDetails.getCCOCycleDetailsIsNotNull() && j < voChemotherapyDetails.getCCOCycleDetails().size(); j++) { if (voChemotherapyDetails.getCCOCycleDetails().get(j).getCycleNumber() != null && voChemotherapyDetails.getCCOCycleDetails().get(j).getIsActiveIsNotNull() && voChemotherapyDetails.getCCOCycleDetails().get(j).getIsActive() && voChemotherapyDetails.getCCOCycleDetails().get(j).getCycleNumber() > maxCycleNum) maxCycleNum = voChemotherapyDetails.getCCOCycleDetails().get(j).getCycleNumber(); } return maxCycleNum > 0 ? Integer.toString(maxCycleNum) : ""; }
protected void onRadioButtonGroupFilterStatusValueChanged() throws PresentationLogicException { ChemotherapyDetailsVo voChemotherapyDetails = domain.getChemotherapyDetailsVo(form.getLocalContext().getChemotherapyDetailsVo()); //WDEV-16069 if (form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getRows() != null) form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getRows().clear(); if (voChemotherapyDetails != null && voChemotherapyDetails.getCycleDetailsIsNotNull()) { voChemotherapyDetails.getCycleDetails().sort(); for (int j = 0; voChemotherapyDetails != null && voChemotherapyDetails.getCycleDetailsIsNotNull() && j < voChemotherapyDetails.getCycleDetails().size(); j++) { populateChemotherapyCyleDetails(voChemotherapyDetails.getCycleDetails().get(j),form.lyrDetails().tabCycleAndDrug().GroupFilterStatus().getValue().equals(GroupFilterStatusEnumeration.rdoStatusActive)); } } //WDEV-16069 }
private void fillCCOGrid(ChemotherapyDetailsVo voChemotherapyDetails) { form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().clear(); if(voChemotherapyDetails == null) return; voChemotherapyDetails.getCCOCycleDetails().sort(SortOrder.ASCENDING); for (int j = 0; voChemotherapyDetails.getCCOCycleDetailsIsNotNull() && j < voChemotherapyDetails.getCCOCycleDetails().size(); j++) { addCCOChemotherapyCyleDetailsRow(voChemotherapyDetails.getCCOCycleDetails().get(j), form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue(), form.lyrDetails().tabCycleAndDrugCCO().GroupStatus().getValue().equals(GroupStatusEnumeration.rdoActiveFilter)); //wdev-1239 } }
public ChemotherapyDetailsVo getChemotherapyDetailsVo(ChemotherapyDetailsRefVo voChemotherapyDetailsRef) { if(voChemotherapyDetailsRef == null || !voChemotherapyDetailsRef.getID_ChemotherapyDetailsIsNotNull()) return null; return ChemotherapyDetailsVoAssembler.create((ChemotherapyDetails)getDomainFactory().getDomainObject(ChemotherapyDetails.class, voChemotherapyDetailsRef.getID_ChemotherapyDetails())); }
public ChemotherapyDetailsVo saveChemotherapyDetailsVo(ChemotherapyDetailsVo voChemotherapyDetails) throws StaleObjectException { if(voChemotherapyDetails == null) throw new RuntimeException("Cannot save null ChemotherapyDetailsVo"); if(voChemotherapyDetails.isValidated() == false) throw new CodingRuntimeException("ChemotherapyDetailsVo is not validated"); DomainFactory factory = getDomainFactory(); ChemotherapyDetails doChemotherapyDetails = ChemotherapyDetailsVoAssembler.extractChemotherapyDetails(factory, voChemotherapyDetails); factory.save(doChemotherapyDetails); return ChemotherapyDetailsVoAssembler.create(doChemotherapyDetails); }