private void populateScreenFromData(HospitalAtNightPatientDetailListVoCollection list) { form.grdWorklist().getRows().clear(); if(list == null || list.size() == 0) return; for(HospitalAtNightPatientDetailListVo record : list) { if(record == null) continue; addHospitalAtNightPatientDetailsRow(record); } form.grdWorklist().setValue(form.getLocalContext().getSelectedInstance()); }
public int compare(HospitalAtNightPatientDetailListVo o1, HospitalAtNightPatientDetailListVo o2) { if (o1.getPatient().getAgeIsNotNull() && o2.getPatient().getAgeIsNotNull()) return o1.getPatient().getAge().compareTo(o2.getPatient().getAge()) * direction; if (o1.getPatient().getAgeIsNotNull() && !o2.getPatient().getAgeIsNotNull()) return direction; if (o2.getPatient().getAgeIsNotNull() && !o1.getPatient().getAgeIsNotNull()) return -1 * direction; return 0; }
public int compare(HospitalAtNightPatientDetailListVo o1, HospitalAtNightPatientDetailListVo o2) { if (o1.getRequestingDateTimeIsNotNull() && o2.getRequestingDateTimeIsNotNull()) return o1.getRequestingDateTime().compareTo(o2.getRequestingDateTime()) * direction; if (o1.getRequestingDateTimeIsNotNull() && !o2.getRequestingDateTimeIsNotNull()) return direction; if (o2.getRequestingDateTimeIsNotNull() && !o1.getRequestingDateTimeIsNotNull()) return -1 * direction; return 0; }
public int compare(HospitalAtNightPatientDetailListVo o1, HospitalAtNightPatientDetailListVo o2) { if (o1.getTypeOfRequestIsNotNull() && o2.getTypeOfRequestIsNotNull()) return o1.getTypeOfRequest().getText().compareToIgnoreCase(o2.getTypeOfRequest().getText()) * direction; if (o1.getTypeOfRequestIsNotNull() && !o2.getTypeOfRequestIsNotNull()) return direction; if (o2.getTypeOfRequestIsNotNull() && !o1.getTypeOfRequestIsNotNull()) return -1 * direction; return 0; }
private void addHospitalAtNightPatientDetailsRow(HospitalAtNightPatientDetailListVo record) { if(record == null) return; grdWorklistRow row = form.grdWorklist().getRows().newRow(); row.setColNHS(record.getPatient().getNhsn() != null ? record.getPatient().getNhsn().getValue() : null); row.setTooltipForColNHS(row.getColNHS()); row.setColHospitalNo(record.getPatient().getHospnum() != null ? record.getPatient().getHospnum().getValue() : null); row.setTooltipForColHospitalNo(row.getColHospitalNo()); row.setColSurname(record.getPatient().getName().getSurname()); row.setTooltipForColSurname(row.getColSurname()); row.setColForename(record.getPatient().getName().getForename()); row.setTooltipForColForename(row.getColForename()); row.setColSex(record.getPatient().getSex() != null ? record.getPatient().getSex().getText() : null); row.setTooltipForColSex(row.getColSex()); Integer age = record.getPatient().getAge(); if(age != null) { row.setColAge(record.getPatient().getAge().toString()); row.setTooltipForColAge(row.getColAge()); } row.setColWard(record.getWardWhenPlacedOnList() != null ? record.getWardWhenPlacedOnList().getName() : null); row.setTooltipForColWard(row.getColWard()); //WDEV-18179 row.setColRequest(record.getTypeOfRequest() != null ? record.getTypeOfRequest().getImage() : null); row.setTooltipForColRequest(record.getTypeOfRequest().getText()); // WDEV-18179 if (record.getRequestingDateTime() != null) row.setColRequestDateTime(record.getRequestingDateTime().toString()); row.setTooltipForColRequestDateTime(row.getColRequestDateTime()); row.setColStatus(record.getCurrentStatus().getStatus().getText()); row.setTooltipForColStatus(row.getColStatus()); row.setColMEWS(record.getMEWS().getText()); row.setTooltipForColMEWS(row.getColMEWS()); row.setValue(record); }