private TumourGroupListForPrimaryTumourDetailsVoCollection listGroupForSpecialty(Specialty specialty) { String hql =""; String[] strings = new String[] {"specialty", "isAct"}; Object[] objects = null; @SuppressWarnings("rawtypes") List find; if (specialty != null) { hql = " select tg from TumourGroup as tg left join tg.associatedSpecialties as tgs where tgs.associatedSpecialty = :specialty and tg.isRIE is null and tgs.isActive = :isAct AND tg.isActive = :isAct order by tg.groupName asc"; objects = new Object[] {getDomLookup(specialty), Boolean.TRUE}; find = getDomainFactory().find(hql, strings, objects); } else { hql = " SELECT tg FROM TumourGroup AS tg WHERE tg.isRIE IS NULL AND tg.isActive = :isAct order by tg.groupName asc"; String[] status = new String[]{"isAct"}; objects = new Object[] {Boolean.TRUE}; find = getDomainFactory().find(hql,status,objects); } return TumourGroupListForPrimaryTumourDetailsVoAssembler.createTumourGroupListForPrimaryTumourDetailsVoCollectionFromTumourGroup(find); }
private void listDiagnosis(Specialty lkpSpecialty) { form.grdChecklist().getRows().clear(); DiagnosisListVoCollection rcColl; try { rcColl = domain.listDiagnosisBySpecialty(lkpSpecialty); } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage()); return; } if (rcColl == null || rcColl.size() == 0) { engine.showMessage("No matching Diagnosis found"); return; } populatePatientDiagnosis(rcColl, domain.listDiagnosisListVoByPatient(form.getGlobalContext().Core.getPatientShort())); }
private void addSpecialitiesRow(DynamicGridRow pRow, SpecialtyCollection specialty) { if (specialty == null) return; for (int i = 0; i < specialty.size(); i++) { Specialty spe = specialty.get(i); DynamicGridRow nRow = pRow.getRows().newRow(); nRow.setIdentifier(SPECIALTY_ROW_IDENTIFIER); nRow.setCollapsedImage(form.getImages().Admin.Specialty01); nRow.setExpandedImage(form.getImages().Admin.Specialty01); DynamicGridCell nCell = nRow.getCells().newCell(getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME), DynamicCellType.ENUMERATION); nCell.setReadOnly(false); nCell.setAutoPostBack(true); nCell.getItems().newItem(spe); nCell.setValue(spe); } }
private ArrayList<Specialty> listSpecialtyByName(String specialtyName) throws CodingRuntimeException { // Leave throws so that specialties are not cleared when an invalid search is made if (specialtyName == null || specialtyName.trim().length() < 3) throw new CodingRuntimeException("Specialty name search must be at least 3 characters long"); // Build filtering lookup Specialty filterLookup = new Specialty(); filterLookup.setText(specialtyName); // Retrieve the specialties (list form domain) try { return domain.listSpecialty(filterLookup); } catch (DomainInterfaceException exception) { throw new CodingRuntimeException(exception.getMessage()); } }
private void prepopulateSpecialties() { //Specialty form.grdSpecialties().getRows().clear(); SpecialtyCollection collSpec = LookupHelper.getSpecialty(domain.getLookupService()); if(collSpec == null) return; for (int i=0;i<collSpec.size();i++) { Specialty specInst = collSpec.get(i); grdSpecialtiesRow row = form.grdSpecialties().getRows().newRow(); row.setSpecialty(specInst); } }
private void populateSpecialtiesGridFromData(SpecialtyCollection specialties, Specialty mainSpecialty) { if(specialties == null) return; for(int i=0;i<form.grdSpecialties().getRows().size();i++) { if(specialties.contains(form.grdSpecialties().getRows().get(i).getSpecialty())) form.grdSpecialties().getRows().get(i).setSelect(true); else form.grdSpecialties().getRows().get(i).setSelect(false); if(mainSpecialty != null) if(form.grdSpecialties().getRows().get(i).getSpecialty().equals(mainSpecialty)) form.grdSpecialties().getRows().get(i).setMain(true); } }
public Specialty getSpecialtyForConsultant(Integer mosID) { StringBuffer hql = new StringBuffer("select medic from Medic as medic left join medic.mos as mos where mos.id= :mosID "); DomainFactory factory = getDomainFactory(); List<?> list = factory.find(hql.toString(), new String[] {"mosID"}, new Object[] {mosID}); if (list!=null && list.size()>0) { MedicVo tempMedic = (MedicVoAssembler.createMedicVoCollectionFromMedic(list)).get(0); return tempMedic.getSpecialty(); } return null; }
public Specialty getCCOSpecialtyMappingFromPASSpecialty(PASSpecialty pasSpecialty) { if (pasSpecialty == null) return null; String szMapping = null; for (int i = 0 ; pasSpecialty.getMappings() != null && i < pasSpecialty.getMappings().size() ; i++) { if (pasSpecialty.getMappings().get(i).getExtSystem().equals("PAS")) szMapping = pasSpecialty.getMappings().get(i).getExtCode(); } if (szMapping != null) return getSpecialtyMappingFromPASSpecialty(szMapping); else return null; }
private String getPASMappingForSpecialty(Specialty specialty) { String strListLocalCodes = ""; if(specialty == null) return strListLocalCodes; LookupMappingVoCollection voSpeccol = getMappings(specialty.getID()); if(voSpeccol != null && voSpeccol.size() > 0) { for(int i=0; i<voSpeccol.size(); i++) { LookupMappingVo voSpec = voSpeccol.get(i); if(voSpec != null && voSpec.getExtSystem() != null && voSpec.getExtSystem().equals(ims.core.vo.lookups.TaxonomyType.PAS.toString())) { strListLocalCodes += voSpec.getExtCode(); return strListLocalCodes; } } } return strListLocalCodes; }
private void initialise() { // WDEV-12293 - Get service for CatsReferral (but we need to pass the CareContext id as the CatsReferral is not available in context) // and default the speciality combo box to it Specialty specialty = domain.getReferralSpecialty(form.getGlobalContext().RefMan.getCatsReferral()); form.cmbSpecialty().setValue(specialty); form.dtimAdm().setValue(new DateTime()); form.getLocalContext().setPasEventLocation(null); populateHospitalCombo(); populateWardCombo(); HcpLiteVo hcpLiteVo = (HcpLiteVo) domain.getHcpLiteUser(); if (hcpLiteVo != null && hcpLiteVo.getHcpTypeIsNotNull() && hcpLiteVo.getHcpType().equals(HcpDisType.MEDICAL)) { MedicLiteVo vo = new MedicLiteVo(hcpLiteVo.getID_Hcp(), hcpLiteVo.getVersion_Hcp()); form.qmbConsultant().newRow( vo, hcpLiteVo.getName().toString()); form.qmbConsultant().setValue(vo); } }
private void addProblemsNotInstantiated() { Specialty lkpSpecialty = form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()?form.getGlobalContext().Core.getCurrentClinicalContact().getSpecialty():null; if (lkpSpecialty == null) lkpSpecialty = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()?form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty():null; ClinicalProblemShortVoCollection voCollPresentingProblems = domain.listPresentingProblems(lkpSpecialty); if (voCollPresentingProblems != null) { for (int i = 0; i < voCollPresentingProblems.size(); i++) { GenForm.grdProblemsRow row = findPatientProblemRow(voCollPresentingProblems.get(i)); if (row == null) { row = form.grdProblems().getRows().newRow(); row.setcolProblems(voCollPresentingProblems.get(i)); // row.setcolProblemName(voCollPresentingProblems.get(i).getPCName()); row.setValue(voCollPresentingProblems.get(i)); setGridUIForAbsent(row); } } } }
private boolean isAlreadyConfigured(Specialty specialty) { boolean bIsAlreadyConfigured = false; for (int i = 0; i < form.treConfig().getNodes().size(); i++) { PresProblemChecklistConfigShortVo vo = (PresProblemChecklistConfigShortVo) form.treConfig().getNodes().get(i).getValue(); if (vo.getSpecialty().equals(specialty)) { bIsAlreadyConfigured = true; break; } } return bIsAlreadyConfigured; }
private void populateSpecialitiesScreenFromData(SpecialtyCollection spec) { form.lyrDetails().tabSpecialties().grdSpecialities().getRows().clear(); if (spec == null) return; for (int i=0 ; i<spec.size() ; i++) { Specialty specialty = spec.get(i); if (specialty != null) { grdSpecialitiesRow newRow = form.lyrDetails().tabSpecialties().grdSpecialities().getRows().newRow(); newRow.setValue(specialty); newRow.setcolSpecialty(specialty.getText()); } } }
private SpecialtyCollection populateSpecialitiesDataFromScreen() { Specialty[] specs = form.lyrDetails().tabSpecialties().grdSpecialities().getValues(); if (specs == null) return null; SpecialtyCollection retVa = new SpecialtyCollection(); for (int i = 0 ; i<specs.length ; i++) { if (specs[i] != null) { retVa.add(specs[i]); } } return retVa; }
private Specialty getSpecialty(LookupInstance specialty) { if(specialty == null) return null; ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (specialty.getImage() != null) { img = new ims.framework.utils.ImagePath(specialty.getImage().getImageId(), specialty.getImage().getImagePath()); } color = specialty.getColor(); if (color != null) color.getValue(); Specialty spec = new Specialty(specialty.getId(),specialty.getText(), specialty.isActive(), null, img, color); return spec; }
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow) { if(item == null) return; item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); item.setIsActive(Boolean.TRUE); item.setIsPresentingProblem(Boolean.TRUE); item.setOnset(childRow.getcolOnset()); item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName()); item.setProblem((ClinicalProblemShortVo) childRow.getValue()); item.setProblemNote(childRow.getcolNotes()); item.setSpecialty((Specialty) childRow.getParentRow().getValue()); if(item.getAuthoringInformation() == null) { item.setAuthoringInformation(getAuthoringInfo()); } }
private EpisodeofCareVoCollection createNewEpisodeOfCare(CareSpellVo voCareSpell) { EpisodeofCareVoCollection voCollEpisodeOfCare = new EpisodeofCareVoCollection(); EpisodeofCareVo voEpisodeOfCare = new EpisodeofCareVo(); if (form.dtimRegistration().getValue() != null) // wdev-16070 voEpisodeOfCare.setStartDate(form.dtimRegistration().getValue().getDate()); voEpisodeOfCare.setSpecialty(Specialty.EMERGENCY); voEpisodeOfCare.setCareSpell(voCareSpell); voEpisodeOfCare.setCareContexts(createNewCareContext(voEpisodeOfCare)); voCollEpisodeOfCare.add(voEpisodeOfCare); form.getLocalContext().setCurrentEpisodeOfCare(voEpisodeOfCare); return voCollEpisodeOfCare; }
public ims.clinicaladmin.vo.TreatmentInterventionLiteVoCollection listTreatmentsInterventions(String criteria, String listOfTreatmentsInterventionsAllreadyAdded) { if(criteria == null || criteria.length() == 0) throw new CodingRuntimeException("Cannot search on null TreatmentIntervention name."); DomainFactory factory = getDomainFactory(); StringBuilder query = new StringBuilder("select ti from TreatmentIntervention as ti left join ti.keywords as kw where ti.isActive = 1 and ti.id not in (select tisec.id from TreatmentInterventionHotlist as th left join th.hotListItem as titem left join titem.treatmentIntervention as tisec left join th.specialty as sp where sp.id = :Emergency) and (ti.treatmentInterventionName like :TreatmentName or kw.keyword like :TreatmentName) "); if(listOfTreatmentsInterventionsAllreadyAdded != null && listOfTreatmentsInterventionsAllreadyAdded.length() > 0) { query.append(" and ti.id not in (" + listOfTreatmentsInterventionsAllreadyAdded + ") "); } query.append(" order by UPPER(ti.treatmentInterventionName) asc"); List<?> tiList = factory.find(query.toString(), new String[] {"Emergency", "TreatmentName"}, new Object[] {Specialty.EMERGENCY.getID(), criteria + "%"}); return TreatmentInterventionLiteVoAssembler.createTreatmentInterventionLiteVoCollectionFromTreatmentIntervention(tiList); }
private Specialty getSpecialty() { if ( (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() ) && (form.getGlobalContext().Core.getCurrentClinicalContact().getSpecialtyIsNotNull()) ) { return form.getGlobalContext().Core.getCurrentClinicalContact().getSpecialty(); } else if ( (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ) && (form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialtyIsNotNull()) ) { return form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty(); } return null; }
private void searchAssesment(Object hcp) { //wdev-16116 Specialty spec = null; if( hcp instanceof MedicVo) spec = ((MedicVo)hcp).getSpecialty(); else if (hcp instanceof NurseVo) spec = ((NurseVo)hcp).getSpecialty(); else if ( hcp instanceof TherapistVo) spec = ((TherapistVo)hcp).getSpecialty(); GraphicAssessmentShortVoCollection assessments = domain.listGraphicalAssesments(spec, form.txtName().getValue()); //wdev-16116 if (assessments == null || assessments.size()==0) { engine.showMessage( "No results found","No Results", MessageButtons.OK, MessageIcon.INFORMATION); return; } if (assessments.size()==1) { populateScreenFromData(assessments.get(0)); form.setMode(FormMode.EDIT); return; } Object[] args = new Object[3]; args[0] = assessments; args[1] = form.txtName().getValue(); args[2] = Boolean.FALSE; engine.open(form.getForms().Clinical.SearchGraphicalAssessment,args); }
public ims.assessment.vo.GraphicAssessmentShortVoCollection listGraphicAssessments(String filter, Boolean specialityOnly) { StringBuilder query = new StringBuilder("select g1_1 from GraphicAssessment as g1_1 left join g1_1.assessmentSpecialties as l1_1 left join l1_1.instance as l2_1 where (upper(g1_1.name) like :filter"); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("filter"); paramValues.add("%" + filter.toUpperCase() + "%"); //wdev-13658 if (specialityOnly) { Object currUser = this.getHcpUser(); if (currUser instanceof MedicVo) { Specialty specialty = ((MedicVo) currUser).getSpecialty(); if (specialty != null) { query.append("and l2_1.id = :specialityId"); paramNames.add("specialityId"); paramValues.add(specialty.getId()); } } else { throw new DomainRuntimeException("Logged in user must be a medic"); } } query.append(") order by g1_1.name asc "); List domObj = getDomainFactory().find(query.toString(), paramNames, paramValues); if (domObj == null || domObj.size() == 0) return null; return GraphicAssessmentShortVoAssembler.createGraphicAssessmentShortVoCollectionFromGraphicAssessment(domObj); }
/** * Search for VTM */ public VTMVoCollection searchVTMByName(String name, Specialty specialty) throws ims.domain.exceptions.DomainInterfaceException { if(name == null || name.trim().length() == 0) return null; DomainFactory domainFactory = getDomainFactory(); if(specialty == null) return VTMVoAssembler.createVTMVoCollectionFromVTM(domainFactory.find("from VTM vt WHERE vt.name like '" + name + "%'")); String hql = "select hli.vTM from VTMHotlist as hl join hl.hotListItem as hli left join hli.vTM as vtm where (vtm.name like '" + name + "%' and hl.specialty.id = " + specialty.getID() + ")"; return VTMVoAssembler.createVTMVoCollectionFromVTM(domainFactory.find(hql)); }
private void newSpecialtyAssociationRow(DynamicGridRow parrentRow, Specialty specialty) { if (parrentRow == null) throw new CodingRuntimeException("Major Logical Error - Can not add specialty association row to a null parrent row"); if (specialty == null) return; DynamicGridCell newCell; DynamicGridColumn column; // Create a new row DynamicGridRow newRow = parrentRow.getRows().newRow(); newRow.setValue(specialty); // Create the first cell in the row (IMAGE) column = form.dyngrdAssociations().getColumns().getByIdentifier(COL_IMAGE); newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE); newCell.setValue(form.getImages().Admin.Specialty01); // Create the second cell in the row (STRING) column = form.dyngrdAssociations().getColumns().getByIdentifier(COL_ASSOCIATION); newCell = newRow.getCells().newCell(column, DynamicCellType.STRING); newCell.setValue(specialty.getText()); newCell.setReadOnly(true); }
private Specialty getSpecialty() { if ((form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) && (form.getGlobalContext().Core.getCurrentClinicalContact().getSpecialtyIsNotNull())) { return form.getGlobalContext().Core.getCurrentClinicalContact().getSpecialty(); } else if ((form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()) && (form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialtyIsNotNull())) { return form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty(); } return null; }
public PathwayShortVoCollection listPathway(String name, Specialty specialty, IMos consultant, PreActiveActiveInactiveStatus status) { //TODO temporary measure until component or new control created if(name != null) name = name.replaceAll("%", ""); List pathways = listDomainPathway(name, specialty, consultant, status); return PathwayShortVoAssembler.createPathwayShortVoCollectionFromPathway(pathways).sort(); }
private void addSpecialtyAssociationsToTemplate(SpecialtyCollection specialties, DynamicGridRowCollection rows) { // NOTE: DO NOT make specialties = new SpecialtyCollection() in this function // specialties MUST ALWAYS reference the specialties in the TemplateAssociationVo if (rows == null) return; if (specialties == null) throw new CodingRuntimeException("Logical Error - Inserting values into null SPECIALTIES collection"); // Add the records from the grid for (int i = 0; i < rows.size(); i++) { DynamicGridRow row = rows.get(i); if (row.getValue() == null) continue; if (!(row.getValue() instanceof Specialty)) throw new CodingRuntimeException("Major Logical Error - Non Specialty association added to SPECIALTIES category"); updateSpecialtyAssociationRowValue(row); Specialty specialtyAssociation = (Specialty) row.getValue(); if (specialtyAssociation != null) specialties.add(specialtyAssociation); } }
public MedicationLiteVoCollection listHotlistMedication(String name, Specialty specialty) throws DomainInterfaceException { if(name == null) throw new DomainRuntimeException("Invalid Search criteria. Medication name filter must be supplied."); if(specialty == null) throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("select distinct medHotListItem from MedicationHotlist as medHotList left join medHotList.hotListItem as medHotListItem left join medHotListItem.medication as med left join med.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where med.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); hql.append(" and medHotList.specialty = :spec"); names.add("spec"); values.add(getDomLookup(specialty)); List hits = Keywords.searchByKeywords(factory, name, hql.toString(), names, values); List meds = new ArrayList(); for (int i = 0; i < hits.size(); i++) { meds.add(((MedicationHotlistItem)hits.get(i)).getMedication()); } return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(meds); }
private boolean specialtyNotOnScreen(Specialty specialty, DynamicGridRow parentRow) { for(int i=0; i<parentRow.getRows().size(); i++) { if(specialty.equals(parentRow.getRows().get(i).getValue())) { return false; } } return true; }
public void updateControlsState() { form.getContextMenus().Correspondence.getNoLetterIsRequiredADDItem().setVisible(form.getMode().equals(FormMode.EDIT) && form.dyngrdLetter().getValue() instanceof Correspondence); form.getContextMenus().Correspondence.getNoLetterIsRequiredREMOVEItem().setVisible(form.getMode().equals(FormMode.EDIT) && (form.dyngrdLetter().getValue() instanceof ClinicLiteVo || form.dyngrdLetter().getValue() instanceof Specialty || form.dyngrdLetter().getValue() instanceof MedicLiteVo)); }
private Specialty getSpecialty() { if ((form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()) && (form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialtyIsNotNull())) { return form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty(); } return null; }
public void initialize() { removeFromCategoryLookup();//WDEV-13606, WDEV-13634 form.lyrMain().tabByTemplate().ccSpecialty().initialize(Specialty.TYPE_ID);// ActivityType.TYPE_ID); initDynamicGrids(); populateDocCatGrid((DocumentCategoryCollection) domain.getLookupService().getLookupCollection(DocumentCategory.TYPE_ID, DocumentCategoryCollection.class, DocumentCategory.class, true, true)); }
private DocumentCategoryConfigShortVoCollection populateDataFromScreenDC() { DynamicGridRowCollection rows = form.lyrMain().tabByCategory().dyngrdMapps().getRows(); DynamicGridColumn colSpec = getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME); if (rows.size() == 0) return null; DocumentCategoryConfigShortVoCollection result = new DocumentCategoryConfigShortVoCollection(); for (int i = 0; i < rows.size(); i++) { DocumentCategoryConfigShortVo docCat = (DocumentCategoryConfigShortVo) rows.get(i).getValue(); docCat.setSpecialty(null); DynamicGridRowCollection specR = rows.get(i).getRows(); if (specR != null && specR.size() > 0) { docCat.setSpecialty(new SpecialtyCollection()); for (int j = 0; j < specR.size(); j++) { Object spec = specR.get(j).getCells().get(colSpec).getValue(); if (spec instanceof Specialty) { docCat.getSpecialty().add((Specialty) spec); } } } result.add(docCat); } return result; }
private void updateSpecialtyAccessRowValue(DynamicGridRow row) { DynamicGridColumn column; DynamicGridCell cell; if (row == null || (row.getParent() == null) || (!(row.getParent().getValue() instanceof AccessCategory)) || (((AccessCategory)row.getParent().getValue()) != AccessCategory.SPECIALTY)) throw new CodingRuntimeException("Major Logical Problem"); if (row.getValue() == null) row.setValue(new SpecialtyAccessVo()); if (!(row.getValue() instanceof SpecialtyAccessVo)) throw new CodingRuntimeException("BUG"); // Get second cell value column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY); cell = row.getCells().get(column); if (cell.getType() != DynamicCellType.STRING) { if (cell.getValue() == null) { cell.setTypedText(null); ((SpecialtyAccessVo) row.getValue()).setSpecialty(null); } else { ((SpecialtyAccessVo) row.getValue()).setSpecialty((Specialty) cell.getValue()); } } // Get third cell value column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS); cell = row.getCells().get(column); ((SpecialtyAccessVo) row.getValue()).setAccessRight((Access) cell.getValue()); }
/** * listPresentingProblems */ public ClinicalProblemShortVoCollection listPresentingProblems(Specialty specialty) { DomainFactory factory = getDomainFactory(); String strHQL = "from PresProblemChecklistConfig p where p.specialty = :specialty"; List probs = factory.find(strHQL, new String[]{"specialty"}, new Object[]{getDomLookup(specialty)}); PresProblemChecklistConfigVoCollection voCollProblems = PresProblemChecklistConfigVoAssembler.createPresProblemChecklistConfigVoCollectionFromPresProblemChecklistConfig(probs); if (voCollProblems.size() == 0) return null; else if (voCollProblems.size() == 1) { voCollProblems.sort(); ClinicalProblemShortVoCollection voCollClinicalProblems = new ClinicalProblemShortVoCollection(); PresProblemChecklistConfigVo vo = voCollProblems.get(0); for (int x=0; x < vo.getPresentingProblems().size(); x++) voCollClinicalProblems.add(vo.getPresentingProblems().get(x).getPresentingProblem()); return voCollClinicalProblems; } //else //throw new DomainRuntimeException("Data integrity violation"); return null; }
private SpecialtyCollection populateSpecialtyInstanceData() { SpecialtyCollection lkpCollSpecialty = new SpecialtyCollection(); for (int i = 0; i < form.treAssociate().getNodes().size(); i++) { if (form.treAssociate().getNodes().get(i).getValue() instanceof Specialty && form.treAssociate().getNodes().get(i).isChecked()) lkpCollSpecialty.add((Specialty) form.treAssociate().getNodes().get(i).getValue()); } return lkpCollSpecialty; }
/** * listHotlistProcedureShort * @throws DomainInterfaceException */ public ims.core.vo.ProcedureLiteVoCollection listHotlistProcedureShort(String procedureName, ims.core.vo.lookups.Specialty lkpSpecialty) throws DomainInterfaceException { if(procedureName == null) throw new DomainRuntimeException("Invalid Search criteria. Clinical Problem name filter must be supplied."); if(lkpSpecialty == null) throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("select distinct procHotListItem from ProcedureHotlist as procHotList left join procHotList.hotlistItem as procHotListItem left join procHotListItem.procedure as proc left join proc.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where proc.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); if (lkpSpecialty !=null) { hql.append(" and procHotList.specialty = :spec"); names.add("spec"); values.add(getDomLookup(lkpSpecialty)); } List hits = Keywords.searchByKeywords(factory, procedureName, hql.toString(), names, values); List ret = new ArrayList(); for (int i = 0; i < hits.size(); i++) { ret.add(((ProcedureHotlistItem)hits.get(i)).getProcedure()); } return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(ret); }
public ProfileType getSpecifierType() { if (this.getInstance() instanceof Specialty) return ProfileType.SPECIALTY; else return null; }
private void populatePasContactFromDtoOutpatient(PasContactVo voPasContact, OutpatientlistRecord dtoOutpatient) { String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue(); LocShortVo voLoc = new LocShortVo(); OrganisationAndLocation locImpl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class); voLoc = locImpl.getLocationByLocalCode(dtoOutpatient.Cliniccode,LocationType.CLINIC); voPasContact.setLocation(voLoc); HcpAdmin hcpAdmin = (HcpAdmin)getDomainImpl(HcpAdminImpl.class); MedicWithMappingsLiteVo voMedicWithMappingsLite = hcpAdmin.getMedicMedicMappingsByPasCode(dtoOutpatient.Hcpcode); voPasContact.setConsultant(voMedicWithMappingsLite == null ? null : voMedicWithMappingsLite); Specialty specialty = (Specialty)getLookupService().getLocalLookup(Specialty.class, Specialty.TYPE_ID, extSystem, dtoOutpatient.Specialty); voPasContact.setSpecialty(specialty); //Contact Number voPasContact.setContactNumber(dtoOutpatient.Contactno); try { voPasContact.setAppointmentDateTime(new DateTime (dtoOutpatient.Apptdate, "1000")); } catch (ParseException e) { voPasContact.setAppointmentDateTime(null); } PatientShort voPatientShort = new PatientShort(); voPatientShort.setName(dtoOutpatient.Snm, dtoOutpatient.Fnm1, null); voPatientShort.addId(PatIdType.HOSPNUM, dtoOutpatient.Hospnum); voPatientShort.addId(PatIdType.CHARTNUM, dtoOutpatient.Chartnum); if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "") voPatientShort.setDob(new PartialDate(dtoOutpatient.Dob)); else voPatientShort.setDob(null); if(dtoOutpatient.Dod != null && dtoOutpatient.Dod != "") { try {voPatientShort.setDod(new Date(dtoOutpatient.Dod,DateFormat.ISO)); } catch (ParseException e2) { e2.printStackTrace(); } } if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "") voPatientShort.calculateAge(); voPatientShort.setWard(voPasContact.getLocation()); voPatientShort.setSex((Sex)getLookupService().getLocalLookup(Sex.class, Sex.TYPE_ID, extSystem, dtoOutpatient.Sex)); voPasContact.setPatient(voPatientShort); voPasContact.setGPCode(dtoOutpatient.Gpcode); if (dtoOutpatient.Documentstatus != "" && Integer.valueOf(dtoOutpatient.Documentstatus).intValue() == DocumentStatus.LETTERREQUIRED.getId()) { voPasContact.setDocumentStatus((DocumentStatus)getLookupService().getLookupInstance(DocumentStatus.class,Integer.valueOf(dtoOutpatient.Documentstatus).intValue())); } else { if (isLetterRequired(voMedicWithMappingsLite, specialty ,null, null) == Boolean.FALSE) voPasContact.setDocumentStatus(DocumentStatus.NOLETTERREQUIRED); else voPasContact.setDocumentStatus(DocumentStatus.LETTERREQUIRED); } }