public PatientDiagnosisShortVoCollection listEpisodeOfCareDiagnoses(EpisodeOfCareRefVo episodeOfCareRefVo) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; condStr.append(andStr + " patdiag.careContext.episodeOfCare.id = :episodeId"); markers.add("episodeId"); values.add(episodeOfCareRefVo.getID_EpisodeOfCare()); andStr = " and "; hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
private PatientDiagnosisShortVoCollection listDiagnosesForPatient(PatientRefVo patrefvo, boolean boolDiagnosis, boolean boolComplication) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); String andStr = " "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); condStr.append(andStr + " patdiag.careContext.episodeOfCare.careSpell.patient.id = :patientId"); markers.add("patientId"); values.add(patrefvo.getID_Patient()); andStr = " and "; if ( (!boolComplication) && (boolDiagnosis) )//List all Diagnosis { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.FALSE); } else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.TRUE); } hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
public PatientDiagnosisShortVo getPatientDiagnosisShort(Integer diagnosisID) { if (diagnosisID == null) throw new RuntimeException("Cannot get DiagnosisManagementVo for null DiagnosisManagementRefVo"); PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis) getDomainFactory().getDomainObject(PatientDiagnosis.class, diagnosisID); return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis); }
public PatientDiagnosisShortVo saveDiagnosis(PatientDiagnosisShortVo patientDiagnosisShortVO) throws StaleObjectException { if(patientDiagnosisShortVO == null) throw new RuntimeException("Cannot save null PatientDiagnosisShortVo"); if(patientDiagnosisShortVO.isValidated() == false) throw new CodingRuntimeException("PatientDiagnosisShortVo has not been validated"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatientDiagnosis = PatientDiagnosisShortVoAssembler.extractPatientDiagnosis(factory, patientDiagnosisShortVO); factory.save(doPatientDiagnosis); return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis); }
public PatientDiagnosisShortVo getDiagnosisShortVo(PatientDiagnosisRefVo patientDiagnosisRefVo) { if(patientDiagnosisRefVo == null) throw new DomainRuntimeException("Cannot get PatientDiagnosisShortVo for null PatientDiagnosisRefVo"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis)factory.getDomainObject(PatientDiagnosis.class,patientDiagnosisRefVo.getID_PatientDiagnosis()); return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis); }
private PatientDiagnosisShortVoCollection listDiagnosesForContact(ClinicalContactRefVo clinicalcontactrefVo, boolean boolDiagnosis, boolean boolComplication) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; condStr.append(andStr + " patdiag.clinicalContact.id = :contactId"); markers.add("contactId"); values.add(clinicalcontactrefVo.getID_ClinicalContact()); andStr = " and "; if ( (!boolComplication) && (boolDiagnosis) )//List all Diagnosis { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.FALSE); } else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.TRUE); } hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
private PatientDiagnosisShortVoCollection listDiagnosesForCareContext(CareContextRefVo clinicalcontactrefVo, boolean boolDiagnosis, boolean boolComplication) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; condStr.append(andStr + " patdiag.careContext.id = :carecontextId"); markers.add("carecontextId"); values.add(clinicalcontactrefVo.getID_CareContext()); andStr = " and "; if ( (!boolComplication) && (boolDiagnosis) )//List all Diagnosis { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.FALSE); } else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.TRUE); } hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
private PatientDiagnosisShortVoCollection listDiagnosesForCareSpell(CareSpellRefVo careSpellRefVo, boolean boolDiagnosis, boolean boolComplication) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; condStr.append(andStr + " patdiag.episodeOfCare.careSpell.id = :carespellId"); markers.add("carespellId"); values.add(careSpellRefVo.getID_CareSpell()); andStr = " and "; if ( (!boolComplication) && (boolDiagnosis) )//List all Diagnosis { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.FALSE); } else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications { condStr.append(andStr + " patdiag.isComplication = :complication"); markers.add("complication"); values.add(Boolean.TRUE); } hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
public PatientDiagnosisShortVoCollection listDiagnosisComplicationsPatient(PatientRefVo patrefVo) { return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(listDiagnosesForPatient(patrefVo, true, true, false)).sort(); }
public PatientDiagnosisShortVoCollection listPatientComplications(PatientRefVo patrefvo) { return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(listDiagnosesForPatient(patrefvo, false, true, false)).sort(); }
public PatientDiagnosisShortVoCollection listPatientDiagnoses(PatientRefVo patrefvo) { return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(listDiagnosesForPatient(patrefvo, true, false, false)).sort(); }
private PatientDiagnosisShortVoCollection listDiagnosesByEpisodeOfCare (EpisodeOfCareRefVo episodeOfCareRefVo, boolean boolDiagnosis, boolean boolComplication, boolean isCancerDiagnosis) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientDiagnosis patdiag "; StringBuffer condStr = new StringBuffer(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Comparable> values = new ArrayList<Comparable>(); String andStr = " "; condStr.append(andStr + " patdiag.episodeOfCare.id = :episodeId"); //wdev-13296 markers.add("episodeId"); values.add(episodeOfCareRefVo.getID_EpisodeOfCare()); andStr = " and "; if ( (!boolComplication) && (boolDiagnosis) )//List all Diagnosis { condStr.append(andStr + " patdiag.isComplication = :complication "); markers.add("complication"); values.add(Boolean.FALSE); } else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications { condStr.append(andStr + " patdiag.isComplication = :complication "); markers.add("complication"); values.add(Boolean.TRUE); } if (isCancerDiagnosis) { condStr.append(andStr + " patdiag.isCancerDiagonsis = :isCancerDiagnosis "); markers.add("isCancerDiagnosis"); values.add(Boolean.TRUE); } hql += " where "; hql += condStr.toString(); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(factory.find(hql,markers,values)).sort(); }
public PatientDiagnosisShortVoCollection listDiagnosisComplicationEpisodeOfCarePlusUnresolved(EpisodeOfCareRefVo episodeOfCareRefVo, PatientRefVo patient) { List list = listDiagnComplicationEpisodeOfCareAndUnresolved(episodeOfCareRefVo, patient); return PatientDiagnosisShortVoAssembler.createPatientDiagnosisShortVoCollectionFromPatientDiagnosis(list).sort(); }