private void populateScreenWithLookups() { form.grdTrackingAreaColum().getRows().clear(); TrackingAreaColumnCollection lkpAreaCollection = LookupHelper.getTrackingAreaColumn(domain.getLookupService()); if (lkpAreaCollection == null) return; for (int i = 0; i < lkpAreaCollection.size(); i++) { if (lkpAreaCollection.get(i).getID() == TrackingAreaColumn.PATHOLOGY_RESULTS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.CLINICAL_IMAGING_RESULTS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.RISKS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.OUTSTANDING_ORDERS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.PATIENT_PREVIOUS_STATUS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.LODGED_TYPE.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.LODGED_DATE_AND_TIME.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.ROOM.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.BED.getID()) //WDEV-17454, wdev-17573 continue; grdTrackingAreaColumRow newAreaColumn = form.grdTrackingAreaColum().getRows().newRow(); newAreaColumn.setcolColumnHeader(lkpAreaCollection.get(i).getIItemText()); newAreaColumn.setcolSelect(false); newAreaColumn.setValue(lkpAreaCollection.get(i)); } }
private String findMapping(TrackingAreaColumn trackingAreaColumn) { LookupInstVo inst = LookupHelper.getTrackingAreaColumnInstance(domain.getLookupService(), trackingAreaColumn.getID()); LookupInstVo areaColumn = domain.getMappings(inst); if (areaColumn != null) { for (int i = 0; i < areaColumn.getMappings().size(); i++) { if (areaColumn.getMappings().get(i).getExtSystem().equals("Maxims Internal")) { return areaColumn.getMappings().get(i).getExtCode(); } } } return null; }
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { switch (menuItemID) { case GenForm.ContextMenus.EmergencyNamespace.TrackingAreaColumn.Edit: form.getLocalContext().setSelectedEvent(null); if (form.grdTrackingAreaColum().getSelectedRow().getcolSelect() == false) { getColumnDetails(); } else { usedSpace = usedSpace - form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } engine.open(form.getForms().Emergency.ColumnConfigDialog); break; } }
private boolean isImageColumn(DynamicGridColumn column) { if(TrackingAreaColumn.ALERTS.equals(column.getIdentifier())) { return true; } if(TrackingAreaColumn.PRIMARY_CARE.equals(column.getIdentifier())) { return true; } if(TrackingAreaColumn.UNKNOWN_PATIENT.equals(column.getIdentifier())) { return true; } if(TrackingAreaColumn.TRANSFER.equals(column.getIdentifier())) //wdev-16867 { return true; } return false; }
@Override protected void onDyngrdTrackCellButtonClicked(DynamicGridCell cell) { if(cell == null || cell.getRow() == null || cell.getColumn() == null) return; form.dyngrdTrack().setValue(cell.getRow().getValue()); trackingSelectionChanged(); updateControlsState(); if(TrackingAreaColumn.CUBICLE.equals(cell.getColumn().getIdentifier())) { engine.open(form.getForms().Emergency.AllocateCubicle); } else if(TrackingAreaColumn.REFERRAL_SPECIALTY.equals(cell.getColumn().getIdentifier())) { engine.open(form.getForms().Emergency.EDReferralToSpecialtyDialog);//WDEV-16777 } else if(TrackingAreaColumn.SEEN_BY_HCP.equals(cell.getColumn().getIdentifier()))//WDEV-16816 { engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816 } }
private void alternateSortOrder(DynamicGridColumn column) { if (form.getLocalContext().getSortOrder() == null) { form.getLocalContext().setSortOrder(new TrackingColumnsSortOrderVo()); } if (column.getIdentifier().equals(form.getLocalContext().getSortOrder().getColumnType())) { if (Boolean.TRUE.equals(form.getLocalContext().getSortOrder().getSortOrder())) { form.getLocalContext().getSortOrder().setSortOrder(false); } else { form.getLocalContext().getSortOrder().setSortOrder(true); } } else { form.getLocalContext().getSortOrder().setColumnType((TrackingAreaColumn) column.getIdentifier()); form.getLocalContext().getSortOrder().setSortOrder(true); } }
private TrackingColumn getHqlConfigByIndex(TrackingAreaColumn trackingColumn) { for(TrackingColumn item : TrackingColumn.values()) { if(item.getIndex().equals(trackingColumn)) { if( TrackingAreaColumn.LENGTH_OF_STAY.equals(item.getIndex())) //wdev-18327 { if (ConfigFlag.DOM.STARTTIME_FOR_LOS_AND_BREACH_CALCULATIONS.getValue().equals("RegistrationDateTime")) item.setHqlSelect("at.registrationDateTime"); else item.setHqlSelect("at.arrivalDateTime"); } return item; } } return null; }
private void populateScreenWithLookups() { form.grdTrackingAreaColum().getRows().clear(); TrackingAreaColumnCollection lkpAreaCollection = LookupHelper.getTrackingAreaColumn(domain.getLookupService()); if (lkpAreaCollection == null) return; for (int i = 0; i < lkpAreaCollection.size(); i++) { if (lkpAreaCollection.get(i).getID() == TrackingAreaColumn.PATHOLOGY_RESULTS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.CLINICAL_IMAGING_RESULTS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.RISKS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.OUTSTANDING_ORDERS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.PATIENT_PREVIOUS_STATUS.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.LODGED_TYPE.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.LODGED_DATE_AND_TIME.getID() || lkpAreaCollection.get(i).getID() == TrackingAreaColumn.ROOM.getID()) //WDEV-17454, wdev-17573 //WDEV-17661 continue; grdTrackingAreaColumRow newAreaColumn = form.grdTrackingAreaColum().getRows().newRow(); newAreaColumn.setcolColumnHeader(lkpAreaCollection.get(i).getIItemText()); newAreaColumn.setcolSelect(false); newAreaColumn.setValue(lkpAreaCollection.get(i)); } }
private void addTrackingColumn(ColumnDetailVo column) { if(column == null || column.getColHeader() == null) return; DynamicGridColumn gridColumn = form.dyngrdTrack().getColumns().newColumn(column.getColHeader()); gridColumn.setIdentifier(column.getColumn()); gridColumn.setHeaderTooltip(column.getColHeader()); //WDEV-20227 gridColumn.setWidth(column.getColWidth()); //WDEV-15819 if (! isImageColumn(gridColumn)) //image columns will not have the sort option { gridColumn.setSortMode(SortMode.MANUAL); } if (TrackingAreaColumn.ATTENDANCE_NOTES_PRESENT.equals(gridColumn.getIdentifier()) || isImageColumn(gridColumn)) //WDEV-19275 { gridColumn.setAlignment(Alignment.CENTER); } }
protected void onGrdTrackingAreaColumGridCheckBoxClicked(int column, grdTrackingAreaColumRow row, boolean isChecked) throws PresentationLogicException { if (!form.getLocalContext().getSelectedRowIsNotNull()) { form.getLocalContext().setSelectedRow(new ColumnDetailVo()); } form.getLocalContext().getSelectedRow().setColumn((TrackingAreaColumn) row.getValue()); if (form.getGlobalContext().Emergency.getAreaColumn() == null) { form.getGlobalContext().Emergency.setAreaColumn(new ColumnDetailVo()); } if (isChecked) { form.getLocalContext().setSelectedEvent(TrackingAreaColumnConfigEvent.AREACOLUMNGRIDCHECKED); getColumnDetails(); engine.open(form.getForms().Emergency.ColumnConfigDialog); } else { form.getLocalContext().setSelectedEvent(null); form.grdTrackingAreaColum().setValue(row.getValue()); if (form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth() != null) { usedSpace = usedSpace - form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } resetColumnConfig(); } }
@Override protected void onGrdTrackingAreaColumSelectionChanged() throws PresentationLogicException { if (form.getLocalContext().getSelectedRow() == null) { form.getLocalContext().setSelectedRow(new ColumnDetailVo()); } form.getLocalContext().getSelectedRow().setColumn((TrackingAreaColumn) form.grdTrackingAreaColum().getValue()); updateContextMenuState(); setAreaColumnGlobalContext(); }
public TrackingPatientsComparator(TrackingAreaColumn columnType, Boolean sortOrder) { this.column = columnType; if (Boolean.TRUE.equals(sortOrder)) { direction = 1; } else { direction = -1; } }
@Override //WDEV-15819 protected void onDyngrdTrackColumnHeaderClicked(DynamicGridColumn column) { TrackingVoCollection patients = form.getLocalContext().getTrackingPatients(); if(patients == null || patients.size() == 0)//WDEV-17310 return; alternateSortOrder(column); patients.sort(new TrackingPatientsComparator((TrackingAreaColumn) column.getIdentifier(), form.getLocalContext().getSortOrder().getSortOrder())); populateRecordsToGrid(form.getLocalContext().getTrackingPatients()); }
@Override protected void onDyngrdTrackCellButtonClicked(DynamicGridCell cell) { if(cell == null || cell.getRow() == null || cell.getColumn() == null) return; form.dyngrdTrack().setValue(cell.getRow().getValue()); trackingSelectionChanged(); updateControlsState(); if(TrackingAreaColumn.CUBICLE.equals(cell.getColumn().getIdentifier())) { engine.open(form.getForms().Emergency.AllocateCubicle); } else if(TrackingAreaColumn.REFERRAL_SPECIALTY.equals(cell.getColumn().getIdentifier())) { engine.open(form.getForms().Emergency.EDReferralToSpecialtyDialog);//WDEV-16777 } else if(TrackingAreaColumn.SEEN_BY_HCP.equals(cell.getColumn().getIdentifier()))//WDEV-16816 { engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816 } else if(TrackingAreaColumn.SEEN_BY_NURSE.equals(cell.getColumn().getIdentifier()))//WDEV-20429 { engine.open(form.getForms().Emergency.EDSeenByNurseAndCompleteDialog);//WDEV-20429 } }
private boolean isColumnAddedInConfig(TrackingAreaColumn column, ColumnDetailVoCollection columns) { if (column==null || columns==null || columns.size()==0) return false; for (int i=0;i<columns.size();i++) { if (columns.get(i)!=null && column.equals(columns.get(i).getColumn())) { return true; } } return false; }