private boolean isAlertInMessage(PatientAlertLiteVo existingAlert,PatientAlertLiteVoCollection alertsFromMsg) { for (PatientAlertLiteVo msgAlertLiteVo : alertsFromMsg) { if ((msgAlertLiteVo. getAlertType() == null ? existingAlert.getAlertType() == null : msgAlertLiteVo. getAlertType().equals( existingAlert.getAlertType())) &&(msgAlertLiteVo.getIsCurrentlyActiveAlert()==null ? existingAlert.getIsCurrentlyActiveAlert()==null : msgAlertLiteVo.getIsCurrentlyActiveAlert().equals(existingAlert.getIsCurrentlyActiveAlert())) &&(msgAlertLiteVo.getSourceofInformation()==null ? existingAlert.getSourceofInformation()==null : msgAlertLiteVo.getSourceofInformation().equals(existingAlert.getSourceofInformation())) //WDEV-17156 &&(msgAlertLiteVo.getComments()==null ? existingAlert.getComments()==null : msgAlertLiteVo.getComments().equals(existingAlert.getComments())) //WDEV-17156 &&(msgAlertLiteVo.getDateIdentified()==null ? existingAlert.getDateIdentified()==null : msgAlertLiteVo.getDateIdentified().equals(existingAlert.getDateIdentified())) ) { // Same alert return true; } } return false; }
private void populateAlerts(PatientAlertLiteVoCollection patientAlerts) { if (patientAlerts == null) return; for (int i = 0 ; i < patientAlerts.size() ; i++) { PatientAlertLiteVo x = patientAlerts.get(i); grdAlertsRow newRow = form.grdAlerts().getRows().newRow(); newRow.setColumnAlert(x.getAlertType().getIItemText()); newRow.setTooltip(x.getAlertType().getIItemText()); } }
private void populateAnaestheticHazardsGrid(PatientAlertLiteVoCollection tempColl) { form.grdAnaestheticHazard().getRows().clear(); if( tempColl == null || tempColl.size() == 0) return; for(int i = 0 ; i < tempColl.size();i++) { PatientAlertLiteVo rowVo = tempColl.get(i); grdAnaestheticHazardRow row = form.grdAnaestheticHazard().getRows().newRow(); if( rowVo != null && rowVo.getAlertTypeIsNotNull()) row.setColumnAnaestheticHazards(rowVo.getAlertType().getText()); row.setValue(rowVo); } }
private void populateAlertsGrid(PatientAlertLiteVoCollection listAlerts) { form.grdAlerts().getRows().clear(); if(listAlerts == null) return; for(PatientAlertLiteVo alert :listAlerts) { addAlertRow(alert); } form.grdAlerts().setValue(form.getLocalContext().getselectedAlert());//WDEV-16176 }
private PatientAlertLiteVoCollection getAnaestheticHazards() { if( form.grdAnaestheticHazard().getRows().size() == 0) return null; PatientAlertLiteVoCollection tempColl = new PatientAlertLiteVoCollection(); for( int i = 0; i < form.grdAnaestheticHazard().getRows().size();i++) { PatientAlertLiteVo tempVo = form.grdAnaestheticHazard().getRows().get(i).getValue(); tempColl.add(tempVo); } return tempColl; }
public PatientAlertLiteVoCollection listAlerts(PatientRefVo patient, IAppRole role) { if(patient == null) throw new CodingRuntimeException("Cannot list Patient Alerts on null Patient Id."); ArrayList<String> names = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("select patAlrt from PatientAlert patAlrt left join patAlrt.alertType as alertType "); hql.append(" where patAlrt.patient.id = :patient"); names.add("patient"); values.add(patient.getID_Patient()); hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); String alertCategoryIds = getAlertCategoryIds(role); if(alertCategoryIds == null || alertCategoryIds.length() == 0) return null; hql.append (" and alertType.parent is not null and alertType.parent.id in ("); hql.append(alertCategoryIds); hql.append(")"); hql.append (" and alertType.parent.id = :alertTypeH"); names.add("alertTypeH"); values.add(AlertType.ANAESTHETIC_HAZARDS.getID()); hql.append(" order by patAlrt.systemInformation.creationDateTime desc"); List<?> list = factory.find(hql.toString(), names,values); return(PatientAlertLiteVoAssembler.createPatientAlertLiteVoCollectionFromPatientAlert(list)); }