private String getDisplayString(ClinicalAdmissionListVo voCA) { StringBuffer sb = new StringBuffer(); if(voCA != null) { sb.append("Admitted by : "); if(voCA.getAdmittingNurseIsNotNull()) { if (voCA.getAdmittingNurse().getMosIsNotNull()) { sb.append(voCA.getAdmittingNurse().getMos().getName().toString()); } if (voCA.getSysInfoIsNotNull()) { sb.append(" on: "); sb.append(voCA.getSysInfo().getCreationDateTime().toString()); } } if (voCA.getDischargedByIsNotNull()) { sb.append(" Discharged By: "); sb.append(voCA.getDischargedBy().getName().toString()); sb.append(" on: "); if (voCA.getDischargedDateTimeIsNotNull()) sb.append(voCA.getDischargedDateTime().toString()); } } return sb.toString(); }
private void recordBrowserValueChanged() { clearInstanceControls(); populateGridAction(null); form.getLocalContext().setlocalContextForRie(null);//WDEV-13846 ClinicalAdmissionVo clinicalAdmission=null;//WDEV-13846 if (form.recbrAdmissions().getValue() != null) { //WDEV-13846 if (engine.isRIEMode()) { clinicalAdmission =domain.getClinicalAdmissionById(form.recbrAdmissions().getValue()); } else { clinicalAdmission = domain.getClinicalAdmission(form.recbrAdmissions().getValue().getCareContext()); } if ((form.recbrAdmissions().getValue() instanceof ClinicalAdmissionListVo) && form.getGlobalContext().Core.getCurrentCareContext().equals(form.recbrAdmissions().getValue().getCareContext())) { form.getLocalContext().setlocalContextForRie(clinicalAdmission); } openClinicalAdmission(clinicalAdmission); } updateControlsState(); }
private void populateRecordBrowser(ClinicalAdmissionListVoCollection collClinicalAdmissions) { //form.getLocalContext().setAllowRecording(true); if(collClinicalAdmissions == null) return; Boolean bFound = false; ClinicalAdmissionListVo voToOpen = null; form.recbrAdmissions().clear(); for (int i = 0; i < collClinicalAdmissions.size(); i++) { ClinicalAdmissionListVo vo = collClinicalAdmissions.get(i); form.recbrAdmissions().newRow(collClinicalAdmissions.get(i), getDisplayString(vo)); if (collClinicalAdmissions.get(i).getCareContextIsNotNull() && form.getGlobalContext().Core.getCurrentCareContextIsNotNull() && collClinicalAdmissions.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext())) { bFound = true; voToOpen = collClinicalAdmissions.get(i); //local context is set only if clinical admission selected in the record browser is linked to the current care context form.getLocalContext().setclinicalAdmission(domain.getClinicalAdmission(voToOpen.getCareContext())); //WDEV-13846 form.getLocalContext().setlocalContextForRie(form.getLocalContext().getclinicalAdmission()); } } if (bFound) { form.recbrAdmissions().setValue(voToOpen); } else { //form.recbrAdmissions().newRow(null, ""); form.recbrAdmissions().newRow(0, null, ""); } recordBrowserValueChanged(); }