private void refreshRounds() { form.cmbRound().clear(); if (form.dteRequired().getValue() != null) { SpecimenCollectionListConfigDetailsVoCollection rounds = domain.listSpecimenCollectionDetails(SpecimenCollectionMethod.INPATIENT, form.dteRequired().getValue()); if (rounds != null) { for (int i = 0; i < rounds.size(); i++) { form.cmbRound().newRow(rounds.get(i), rounds.get(i).getTime().getText()); } } } }
private void dteCollectValueChanged() { Date date = form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().getValue(); form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().clear(); if (date == null) return; if (date.isLessThan(new Date())) { engine.showMessage("Date cannot be in the past"); form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dteCollect().setValue(null); return; } SpecimenCollectionListConfigDetailsVoCollection voCollCfg = domain.listSpecimenCollectionDetails(SpecimenCollectionMethod.INPATIENT, date); if (voCollCfg != null) { for (int i = 0; i < voCollCfg.size(); i++) form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().cmbTime().newRow(voCollCfg.get(i).getTime(), voCollCfg.get(i).getTime().getText()); } }
private void dateChanged() { Date date = form.dteDate().getValue(); form.cmbRound().clear(); if (date == null) return; if (date.isLessThan(new Date())) { engine.showMessage("Date cannot be in the past"); form.dteDate().setValue(null); return; } SpecimenCollectionListConfigDetailsVoCollection voCollCfg = domain.listSpecimenCollectionDetails(SpecimenCollectionMethod.INPATIENT, date); if (voCollCfg != null) { for (int i = 0; i < voCollCfg.size(); i++) form.cmbRound().newRow(voCollCfg.get(i).getTime(), voCollCfg.get(i).getTime().getText()); } }
protected void onDyngrdPhlebCellValueChanged(DynamicGridCell cell) { DynamicGrid grid = form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdInpat(); if (cell.getType().equals(DynamicCellType.DATE)) { Date date = (Date) cell.getValue(); DynamicGridCell cellTimes = cell.getRow().getCells().get(grid.getColumns().getByIdentifier(DYN_COLTIME)); cellTimes.getItems().clear(); if (date != null) { if (date.isLessThan(new Date())) { engine.showMessage("Date cannot be in the past"); cell.setValue(null); return; } SpecimenCollectionListConfigDetailsVoCollection voCollCfg = domain.listSpecimenCollectionDetails(SpecimenCollectionMethod.INPATIENT, date); if (voCollCfg != null) { for (int i = 0; i < voCollCfg.size(); i++) cellTimes.getItems().newItem(voCollCfg.get(i).getTime(), voCollCfg.get(i).getTime().toString()); } } } }
public SpecimenCollectionListConfigDetailsVoCollection listSpecimenCollectionDetails(SpecimenCollectionMethod type, Date date) { if(type == null || date == null) throw new CodingRuntimeException("Coding Error = type or date is null (listSpecimenCollectionDetails) "); DayOfWeek dayInst = getDayOfWeek(date); DomainFactory factory = getDomainFactory(); List cfgSpecs = factory.find("from SpecimenCollectionListConfigDetails detail where detail.dayOfWeek = :dayOfWeekInst and id in (select header.detail.id from SpecimenCollectionListConfig header where header.listType = :listType)", new String[]{"dayOfWeekInst","listType"}, new Object[] { getDomLookup(dayInst),getDomLookup(type)}); SpecimenCollectionListConfigDetailsVoCollection voCollSpecimenListConfigDetail = null; if(cfgSpecs != null && cfgSpecs.size() > 0) voCollSpecimenListConfigDetail = SpecimenCollectionListConfigDetailsVoAssembler.createSpecimenCollectionListConfigDetailsVoCollectionFromSpecimenCollectionListConfigDetails(cfgSpecs); return voCollSpecimenListConfigDetail; }
private SpecimenCollectionListConfigDetailsVoCollection populateSpecimenCollectionListConfigDetails() { GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row; SpecimenCollectionListConfigDetailsVoCollection voCollListConfigDetails = new SpecimenCollectionListConfigDetailsVoCollection(); for (int i = 0; i < form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().size(); i++) { row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().get(i); if (row.getcolMonday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.MONDAY); } if (row.getcolTuesday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.TUESDAY); } if (row.getcolWednesday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.WEDNESDAY); } if (row.getcolThursday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.THURSDAY); } if (row.getcolFriday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.FRIDAY); } if (row.getcolSaturday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.SATURDAY); } if (row.getcolSunday()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.SUNDAY); } if (row.getcolExceptionDays()) { populateCollectionWithRowDetail(row, voCollListConfigDetails, DayOfWeek.PUBLICHOLIDAY); } } return voCollListConfigDetails; }
public SpecimenCollectionListConfigDetailsVoCollection listSpecimenCollectionDetails(SpecimenCollectionMethod type, Date date) { SpecimenCollectionConfig impl = (SpecimenCollectionConfig) getDomainImpl(SpecimenCollectionConfigImpl.class); return impl.listSpecimenCollectionDetails(type, date); }
public SpecimenCollectionListConfigDetailsVoCollection listSpecimenCollectionDetails(SpecimenCollectionMethod type, Date date) { MyOrder myOrderImpl = (MyOrder) getDomainImpl(MyOrderImpl.class); return myOrderImpl.listSpecimenCollectionDetails(type, date); }