private void bindEpisodeCombo() { form.cmbEpisode().clear(); EpisodeofCareShortVoCollection listEpisodesOfCare = domain.listEpisodesOfCare(form.getGlobalContext().Core.getPatientShort()); for (int i = 0 ; listEpisodesOfCare != null && i < listEpisodesOfCare.size() ; i++) { EpisodeofCareShortVo eoc = listEpisodesOfCare.get(i); if (eoc != null) { form.cmbEpisode().newRow(eoc, getTextForEOC(eoc)); } } }
private void bindEpisodeCombo() throws PresentationLogicException { form.cmbEpisodes().clear(); EpisodeofCareShortVoCollection listEpisodesOfCare = domain.listEpisodesOfCare(form.getGlobalContext().Core.getPatientShort()); for (int i = 0 ; listEpisodesOfCare != null && i < listEpisodesOfCare.size() ; i++) { EpisodeofCareShortVo eoc = listEpisodesOfCare.get(i); if (eoc != null) { form.cmbEpisodes().newRow(eoc, getTextForEOC(eoc)); } } }
private void initialize() { ReportTemplateBoRefLiteVoCollection classes = domain.listClassesWithTemplates(); for (int i = 0; i < classes.size(); i++) { form.cmbClass().newRow(classes.get(i).getBusinessObj(), getShortClassname(classes.get(i).getBusinessObj())); } EpisodeofCareShortVoCollection episList = domain.listEpisodeOfCaresByPatient(form.getGlobalContext().Core.getPatientShort()); for (int i = 0; i < episList.size(); i++) { form.cmbEpisodeOfCare().newRow(episList.get(i), getEpisodeOfCareDisplayString(episList.get(i))); } setDefaults(); }
/** * WDEV-13261 * List EpisodeOfCare records for the given patient */ public EpisodeofCareShortVoCollection listEpisodesForPatient(PatientRefVo patient) { DomainFactory factory = getDomainFactory(); ArrayList<String> names = new ArrayList<String>(); ArrayList values = new ArrayList(); names.add("patient"); values.add(patient.getID_Patient()); List lst = factory.find("select epis from EpisodeOfCare epis join epis.careSpell cs left join epis.currentStatus as currentStatus where (cs.patient.id = :patient and (currentStatus is null or currentStatus.status.id <> -2218))", names, values); //WDEV-14326 if (lst != null && lst.size() > 0) return EpisodeofCareShortVoAssembler.createEpisodeofCareShortVoCollectionFromEpisodeOfCare(lst); return null; }
private void open() { EpisodeofCareShortVoCollection voColl = domain.listEpisodeOfCare(form.getGlobalContext().Core.getPatientShort()); for(int i = 0 ; voColl != null && i < voColl.size() ; i++) { grdCareSpellsRow row = form.grdCareSpells().getRows().newRow(); row.setColDate(voColl.get(i).getStartDateIsNotNull() ? voColl.get(i).getStartDate().toString() : ""); row.setColSpec(voColl.get(i).getSpecialtyIsNotNull() ? voColl.get(i).getSpecialty().getText() : ""); row.setColHCP(voColl.get(i).getResponsibleHCPIsNotNull() ? voColl.get(i).getResponsibleHCP().getName().toString() : ""); row.setColEndDate(voColl.get(i).getEndDateIsNotNull() ? voColl.get(i).getEndDate().toString() : ""); row.setValue(voColl.get(i)); } }
public EpisodeofCareShortVoCollection listEpisodesOfCare(PatientRefVo patientId) { if (patientId == null || !patientId.getID_PatientIsNotNull()) { throw new CodingRuntimeException("Supplied patient is null or doesn't have an id."); } String hql = "select e1_1 from EpisodeOfCare as e1_1 left join e1_1.careSpell as c1_1 left join c1_1.patient as p1_1 where (p1_1.id = :Patient_id) order by e1_1.startDate desc ";//WDEV-12385 List<?> list = getDomainFactory().find(hql, "Patient_id", patientId.getID_Patient()); if (list == null || list.size() == 0) return null; return EpisodeofCareShortVoAssembler.createEpisodeofCareShortVoCollectionFromEpisodeOfCare(list); }
public EpisodeofCareShortVoCollection listEpisodeOfCaresByPatient(PatientRefVo patientVo) { if(patientVo == null) throw new DomainRuntimeException("Invalid Argument: Patient not provided"); DomainFactory factory = getDomainFactory(); return EpisodeofCareShortVoAssembler.createEpisodeofCareShortVoCollectionFromEpisodeOfCare( factory.find("from EpisodeOfCare epis where epis.careSpell.patient.id = :PID", new String[] {"PID"}, new Object[] {patientVo.getID_Patient()})).sort(); }
public String getSpecialtyForCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getSpecialtyForCareContext"); DomainFactory factory = getDomainFactory(); List dischargeDetails = factory.find("select eoc from EpisodeOfCare as eoc left join eoc.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); EpisodeofCareShortVoCollection eocVos = EpisodeofCareShortVoAssembler.createEpisodeofCareShortVoCollectionFromEpisodeOfCare(dischargeDetails); return eocVos != null && eocVos.size() > 0 ? ((eocVos.get(0) != null && eocVos.get(0).getSpecialtyIsNotNull()) ? eocVos.get(0).getSpecialty().toString() : "") : ""; }
public HcpRefVo getResponsibleHCPForCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getResponsibleHCPForCareContext"); DomainFactory factory = getDomainFactory(); List dischargeDetails = factory.find("select eoc from EpisodeOfCare as eoc left join eoc.careContexts as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); EpisodeofCareShortVoCollection eocVos = EpisodeofCareShortVoAssembler.createEpisodeofCareShortVoCollectionFromEpisodeOfCare(dischargeDetails); return eocVos != null && eocVos.size() > 0 ? ((eocVos.get(0) != null && eocVos.get(0).getResponsibleHCPIsNotNull()) ? eocVos.get(0).getResponsibleHCP() : null) : null; }
/** WDEV-13261 * Load the local Episode of CareList into the combo * If the global context is set, default to that value */ private void LoadEpisodeOfCareCombo() { // WDEV-13261 PatientShort patVo = form.getGlobalContext().Core.getPatientShort(); EpisodeofCareShortVoCollection episColl = domain.listEpisodesForPatient(patVo); if(episColl != null) { for(int x = 0; x < episColl.size(); x++) { EpisodeofCareShortVo episVo = episColl.get(x); String specialty=""; if (episVo.getSpecialtyIsNotNull()) specialty = episVo.getSpecialty().getText(); String consultant = ""; if (episVo.getResponsibleHCPIsNotNull()) consultant = episVo.getResponsibleHCP().getIMosName(); String startDate = episVo.getStartDate().toString(); String endDate=""; if (episVo.getEndDateIsNotNull()) endDate = episVo.getEndDate().toString(); String EpisodeText = specialty + " - " + consultant + " - " + startDate + " - " + endDate; form.cmbEpisode().newRow(episVo, EpisodeText); } } if (form.getGlobalContext().Core.getEpisodeofCareShort() != null) form.cmbEpisode().setValue(form.getGlobalContext().Core.getEpisodeofCareShort()); }