public TriageForRelvantPMHVo getTriageByCareContext(CareContextRefVo careContextRef) { DomainFactory factory = getDomainFactory(); if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TriageForPatientMedsVo on null Id "); } StringBuffer hql = new StringBuffer(); hql.append("select triage from Triage as triage where triage.attendance.id = :careContextID "); List<?> list = factory.find(hql.toString(), new String[] {"careContextID"}, new Object[] {careContextRef.getID_CareContext()}); if (list!=null && list.size()>0) return TriageForRelvantPMHVoAssembler.create((Triage)list.get(0)); return null; }
private void PopulateRecordBrowser()//WDEV-17602 { PatientRelevantPMHVoCollection allRelevantPHM = domain.getAllRelevantPMH(form.getLocalContext().getSelectedPatientRef()); form.recbrPMH().clear(); for (int i = 0; i < allRelevantPHM.size(); i++) { PatientRelevantPMHVo PatientRelevantPMH = allRelevantPHM.get(i); if (PatientRelevantPMH == null) return; StringBuffer text = new StringBuffer(); CareContextRefVo voCareContexPMH = PatientRelevantPMH.getAttendance(); TriageForRelvantPMHVo triage = domain.getTriageByCareContext(PatientRelevantPMH.getAttendance()); PatientProblemForRelevantPMHVo voPatientProblem = (triage!=null ? triage.getMainPresentingProblem() : null); text.append(getTextToDisplayFromEmergencyAttendance(PatientRelevantPMH.getAttendance())); //WDEV-17127 PatientRelevantPMHVo voPatientProblemPMH = domain.getRelevantPMH(voCareContexPMH); if (voPatientProblemPMH!=null && voPatientProblemPMH.getAuthoringInformationIsNotNull()) { if (voPatientProblemPMH.getAuthoringInformation().getAuthoringDateTimeIsNotNull()) { text.append(voPatientProblemPMH.getAuthoringInformation().getAuthoringDateTime()); text.append(" - "); } if (voPatientProblemPMH.getAuthoringInformation().getAuthoringHcpIsNotNull()) { text.append(voPatientProblemPMH.getAuthoringInformation().getAuthoringHcp().getName()); text.append(" - "); } } if (voPatientProblem != null) { if (voPatientProblem.getPatientProblemIsNotNull()) { text.append(" - "); text.append(voPatientProblem.getPatientProblem()); } } if (voCareContexPMH.equals(form.getLocalContext().getCurrentCareContextRef())) { form.recbrPMH().newRow(i,PatientRelevantPMH.getAttendance(), text.toString(),Color.Green); continue; } form.recbrPMH().newRow(i, PatientRelevantPMH.getAttendance(), text.toString()); } //WDEV-17602 ArrayList collRecBrowser = form.recbrPMH().getValues(); if (!collRecBrowser.contains(form.getLocalContext().getCurrentCareContextRef())) { form.recbrPMH().newRow(form.getLocalContext().getCurrentCareContextRef(), getTextToDisplayFromEmergencyAttendance(form.getLocalContext().getCurrentCareContextRef()).toString(), Color.Green); } form.recbrPMH().setValue(form.getLocalContext().getCurrentCareContextRef()); }
private void PopulateRecordBrowser()//WDEV-17602 { PatientRelevantPMHVoCollection allRelevantPHM = domain.getAllRelevantPMH(form.getLocalContext().getSelectedPatientRef()); form.recbrPMH().clear(); for (int i = 0; i < allRelevantPHM.size(); i++) { PatientRelevantPMHVo PatientRelevantPMH = allRelevantPHM.get(i); if (PatientRelevantPMH == null) return; StringBuffer text = new StringBuffer(); CareContextRefVo voCareContexPMH = PatientRelevantPMH.getAttendance(); TriageForRelvantPMHVo triage = domain.getTriageByCareContext(PatientRelevantPMH.getAttendance()); PatientProblemForRelevantPMHVo voPatientProblem = (triage!=null ? triage.getMainPresentingProblem() : null); text.append(getTextToDisplayFromEmergencyAttendance(PatientRelevantPMH.getAttendance())); //WDEV-17127 PatientRelevantPMHVo voPatientProblemPMH = domain.getRelevantPMH(voCareContexPMH); if (voPatientProblemPMH!=null && voPatientProblemPMH.getAuthoringInformationIsNotNull()) { text.append(" - "); //WDEV-19534 if (voPatientProblemPMH.getAuthoringInformation().getAuthoringDateTimeIsNotNull()) { text.append(voPatientProblemPMH.getAuthoringInformation().getAuthoringDateTime()); text.append(" - "); } if (voPatientProblemPMH.getAuthoringInformation().getAuthoringHcpIsNotNull()) { text.append(voPatientProblemPMH.getAuthoringInformation().getAuthoringHcp().getName()); //text.append(" - "); //WDEV-19534 } } if (voPatientProblem != null) { if (voPatientProblem.getPatientProblemIsNotNull()) { text.append(" - "); text.append(voPatientProblem.getPatientProblem()); } } if (voCareContexPMH.equals(form.getLocalContext().getCurrentCareContextRef())) { form.recbrPMH().newRow(i,PatientRelevantPMH.getAttendance(), text.toString(),Color.Green); continue; } form.recbrPMH().newRow(i, PatientRelevantPMH.getAttendance(), text.toString()); } //WDEV-17602 ArrayList collRecBrowser = form.recbrPMH().getValues(); if (!collRecBrowser.contains(form.getLocalContext().getCurrentCareContextRef())) { form.recbrPMH().newRow(form.getLocalContext().getCurrentCareContextRef(), getTextToDisplayFromEmergencyAttendance(form.getLocalContext().getCurrentCareContextRef()).toString(), Color.Green); } form.recbrPMH().setValue(form.getLocalContext().getCurrentCareContextRef()); }