private void populateLabelsFromTriage() { TriageForEventHistoryVo triage = domain.getTriageForEventHistory(form.getGlobalContext().Core.getCurrentCareContext()); if (triage == null) { return; } if (triage.getTriageStartDateTimeIsNotNull()) { form.lblTriageDateAndTime().setValue(triage.getTriageStartDateTime().toString()); } if (triage.getMedicInterventionStartDateTimeIsNotNull()) { form.lblInterventionDateAndTime().setValue(triage.getMedicInterventionStartDateTime().toString()); } if (triage.getMainPresentingProblemIsNotNull()) { form.lblPresentingProblem().setValue(triage.getMainPresentingProblem().getPatientProblem().toUpperCase()); } if (triage.getCurrentTriagePriorityIsNotNull()) { form.lblTriagePriority().setValue(triage.getCurrentTriagePriority().getText().toUpperCase()); } if (triage.getCurrentTriageAssessmentIsNotNull() && triage.getCurrentTriageAssessment().getDiscriminatorIsNotNull()) { form.lblDiscriminator().setValue(triage.getCurrentTriageAssessment().getDiscriminator().getDiscriminator().getDiscriminatorName().toUpperCase()); } }
public TriageForEventHistoryVo getTriageForEventHistory(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TriageForEventHistoryVo on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select triage from Triage as triage left join triage.attendance as contextID where contextID.id = :contextID"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); TriageForEventHistoryVoCollection triage = TriageForEventHistoryVoAssembler.createTriageForEventHistoryVoCollectionFromTriage(factory.find(hql.toString(), markers, values)); if (triage != null && triage.size() > 0) { return triage.get(0); } else { return null; } }
private void populateLabelsFromTriage() { TriageForEventHistoryVo triage = domain.getTriageForEventHistory(form.getGlobalContext().Core.getCurrentCareContext()); if (triage == null) { return; } if (triage.getTriageStartDateTimeIsNotNull()) { form.lblTriageDateAndTime().setValue(triage.getTriageStartDateTime().toString()); } if (triage.getMedicInterventionStartDateTimeIsNotNull()) { form.lblInterventionDateAndTime().setValue(triage.getMedicInterventionStartDateTime().toString()); } if (triage.getMainPresentingProblemIsNotNull()) { //WDEV-19159 -------------starts here String tooltip = null; String text = triage.getMainPresentingProblem().getPatientProblem(); if (triage.getMainPresentingProblem().getPatientProblem().length() > 60) { text = text.substring(0, 60) + "..."; tooltip = triage.getMainPresentingProblem().getPatientProblem().toUpperCase(); } form.lblPresentingProblem().setValue(text.toUpperCase()); form.lblPresentingProblem().setTooltip(tooltip); //WDEV-19159 -------------end } if (triage.getCurrentTriagePriorityIsNotNull()) { form.lblTriagePriority().setValue(triage.getCurrentTriagePriority().getText().toUpperCase()); } if (triage.getCurrentTriageAssessmentIsNotNull() && triage.getCurrentTriageAssessment().getDiscriminatorIsNotNull()) { form.lblDiscriminator().setValue(triage.getCurrentTriageAssessment().getDiscriminator().getDiscriminator().getDiscriminatorName().toUpperCase()); } }