private void loadProblems() { PatientProblemVoCollection list = domain.listProblems(form.getGlobalContext().Core.getPatientShort()); if(list != null) { for(int x = 0; x < list.size(); x++) { if(list.get(x) != null && list.get(x).getPatientProblemIsNotNull()) { if(!list.get(x).equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation())) { addNewItem(list.get(x)); } } } } }
private PatientProblemVo getInstantiatedProblem(ProblemListVo problem, Specialty specialty, PatientProblemVoCollection list) { if(list == null) return null; for (int i = 0; i < list.size(); i++) { if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty) && list.get(i).getProblemIsNotNull() && list.get(i).getProblem().getID_ClinicalProblem().equals(problem.getPresentingProblem().getID_ClinicalProblem())) return list.get(i); } return null; }
private boolean anyProblemsForThisSpecialty(Specialty specialty, PatientProblemVoCollection list) { if(list == null) return false; for (int i = 0; i < list.size(); i++) { if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty)) return true; } return false; }
private int getProblemIndex(ClinicalProblemShortVo problem, Specialty specialty, PatientProblemVoCollection list) { if(list == null) return -1; for (int i = 0; i < list.size(); i++) { if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty) && list.get(i).getProblemIsNotNull() && list.get(i).getProblem().getID_ClinicalProblem().equals(problem.getID_ClinicalProblem())) return i; } return -1; }
public PatientProblemVoCollection listPatientProblemsByCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("No Care context Supplied"); DomainFactory factory = getDomainFactory(); List problems = factory.find("from PatientProblem p where p.careContext.id = :careContextId order by p.specialty.text, p.problem.pCName", new String[]{"careContextId"},new Object[]{careContext.getID_CareContext()}); return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); }
private void populatePatientProblems(PatientProblemVoCollection voColl) { form.getLocalContext().setPatientProblemVoCollection(voColl); for (int i = 0; i < voColl.size(); i++) { populatePatientProblemControls(voColl.get(i)); } }
private PatientPresentingProblemsVo searchPresentPatientProblem(grdProblemsRow row) { PatientProblemVoCollection voColl = domain.listPatientProblemsByPatient(form.getGlobalContext().Core.getPatientShort()); if (voColl != null) { for (int i = 0; i < voColl.size(); i++) { // if was linked if (voColl.get(i).getProblemIsNotNull() && voColl.get(i).getProblem().equals(row.getValue()) && voColl.get(i).getCareContext().getID_CareContext().equals(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext())) { return new PatientPresentingProblemsVo(); } else { PatientPresentingProblemsVo patientProblems = domain.getPatientProblems(voColl.get(i)); if (voColl.get(i).getProblemIsNotNull() && (!(voColl.get(i).getProblemIsNotNull() && voColl.get(i).getProblem().equals(row.getValue())) && row.getcolProblems().equals((patientProblems).getProblem()))) { return patientProblems; } else if (voColl.get(i).getProblemIsNotNull() && ((voColl.get(i).getProblemIsNotNull() && voColl.get(i).getProblem().equals(row.getValue())) && row.getcolProblems().equals((patientProblems).getProblem()) && !voColl.get(i).getCareContext().getID_CareContext().equals(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext()))) { return patientProblems; } } } } return new PatientPresentingProblemsVo(); }
/** * listByClinicalContact */ public ims.core.vo.PatientProblemVoCollection listByClinicalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalcontact) { if(clinicalcontact == null) throw new DomainRuntimeException("Invalid clinical contact"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProblem p "); hql.append(" where p.isActive = TRUE and p.clinicalContact.id = " + clinicalcontact.getID_ClinicalContact()); return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString()))); }
public PatientProblemVoCollection listByPatient(PatientRefVo patient) { if(patient == null || patient.getID_Patient() == null) throw new DomainRuntimeException("No Patient Supplied"); DomainFactory factory = getDomainFactory(); List problems = factory.find("from PatientProblem problem where problem.careContext.episodeOfCare.careSpell.patient.id = :patientId and problem.isActive = :active ", new String[]{"patientId","active"},new Object[]{patient.getID_Patient(), Boolean.TRUE}); if(problems != null) return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem(problems); return null; }
public PatientProblemVoCollection listProblemsByCareContext(CareContextRefVo careContextRefVo) { if(careContextRefVo == null) throw new DomainRuntimeException("Invalid Care Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProblem p "); hql.append(" where p.isActive = TRUE and p.careContext.id = " + careContextRefVo.getID_CareContext()); return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString()))); }
public PatientProblemVoCollection listProblemsByCareSpell(CareSpellRefVo careSpellRefVo) { if(careSpellRefVo == null) throw new DomainRuntimeException("Invalid Care Spell Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProblem p "); hql.append(" where p.isActive = TRUE and p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell()); return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString()))); }
public PatientProblemVoCollection listProblemsByEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo) { if(episodeOfCareRefVo == null) throw new DomainRuntimeException("Invalid Episode Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProblem p "); hql.append(" where (p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare() + ")"); hql.append(" or (p.isResolved = " + Boolean.FALSE + ")"); return PatientProblemVoAssembler.createPatientProblemVoCollectionFromPatientProblem((factory.find(hql.toString()))); }