private void fillRecordBrowser(HydrotherapyShortVoCollection voHydroColl) { form.recbrHydro().clear(); boolean selectedClinicalContactFound = false; CareContextShortVo voSelectedCareContext = form.getGlobalContext().Core.getCurrentCareContext(); ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); form.recbrHydro().newRow(voSelectedCareContext, voSelectedCareContext.getRecordBrowserText()); if(voHydroColl != null) { for(int i = 0 ; i < voHydroColl.size() ; i++) { ClinicalContactShortVo voClinicalContact = voHydroColl.get(i).getClinicalContact(); if(voSelectedClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voSelectedClinicalContact.getID_ClinicalContact())) { selectedClinicalContactFound = true; form.recbrHydro().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString(), Color.Green); form.recbrHydro().setValue(voClinicalContact); } else { form.recbrHydro().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString()); } } } if(!selectedClinicalContactFound && voSelectedClinicalContact != null) { form.recbrHydro().newRow(voSelectedClinicalContact, "\t\t\t\tClinical Contact: " + voSelectedClinicalContact.getStartDateTime().toString() + " - " + voSelectedClinicalContact.getSeenBy().toString(), Color.Green); form.recbrHydro().setValue(voSelectedClinicalContact); } browseRecord(); }
/** * WDEV-13587 * List Hydrotherapy records, including RIE records */ public HydrotherapyShortVoCollection listHydroForCareContext(CareContextRefVo careContextRefVo) { if (careContextRefVo == null) throw new DomainRuntimeException("Cannot list CareContextRefVo is null"); String query = "from Hydrotherapy hr where hr.clinicalContact.careContext.id = :RCC"; return HydrotherapyShortVoAssembler.createHydrotherapyShortVoCollectionFromHydrotherapy(getDomainFactory().find(query, "RCC", careContextRefVo.getID_CareContext())); }