private void setUpdatedHeader() { if(form.recbrPathology().getValue() != null) { if ((form.recbrPathology().getValue() instanceof CareContextVo)) { CareContextVo voCareContext = (CareContextVo) form.recbrPathology().getValue(); form.getLocalContext().setUpdatedInstance(voCareContext); } else if (form.recbrPathology().getValue() instanceof CareContextShortVo) //WDEV-15081 { CareContextShortVo voCareContextShort = (CareContextShortVo) form.recbrPathology().getValue(); form.getLocalContext().setUpdatedInstance(voCareContextShort); } else { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrPathology().getValue(); form.getLocalContext().setUpdatedInstance(voClinicalContact); } } }
public CareContextShortVoCollection listOPEDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) { DomainFactory factory = getDomainFactory(); List OPDList = factory.find(" from OPDErectDysfxn opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc", new String[]{"ecId"}, new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()}); CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection(); for (int x = 0; x < OPDList.size(); x++) { OPDErectDysfxn domOPD = (OPDErectDysfxn) OPDList.get(x); CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext()); voCareContextList.add(voCareContext); } return voCareContextList; }
public CareContextShortVoCollection listOPDCareContextsByEpisodeOfCare(EpisodeOfCareRefVo refEpisodeOfCare) { DomainFactory factory = getDomainFactory(); List OPDList = factory.find(" from OPDSpasticityAssessTreat opd where opd.careContext.episodeOfCare.id = :ecId and opd.isRIE is null order by opd.careContext.startDateTime desc", new String[]{"ecId"}, new Integer[]{refEpisodeOfCare.getID_EpisodeOfCare()}); CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection(); for (int x = 0; x < OPDList.size(); x++) { OPDSpasticityAssessTreat domOPD = (OPDSpasticityAssessTreat) OPDList.get(x); CareContextVo voCareContext = CareContextVoAssembler.create(domOPD.getCareContext()); voCareContextList.add(voCareContext); } return voCareContextList; }
private void bindWardCombo(CareContextVo careContext) { if(careContext == null || careContext.getPasEvent() == null || careContext.getPasEvent().getLocation() == null) return; LocationLiteVoCollection wards = domain.listWardsForCurrentHospital(careContext.getPasEvent().getLocation()); if(wards == null || wards.size() == 0) return; form.cmbWard().clear(); for(int i=0; i<wards.size(); i++) { if(wards.get(i) == null) continue; form.cmbWard().newRow(wards.get(i), wards.get(i).getIItemText()); } form.cmbWard().setValue(careContext.getPasEvent().getLocation()); }
protected void onGridListSelectionChanged() throws ims.framework.exceptions.PresentationLogicException { if (form.grdList().getValue() != null) { form.btnOk().setEnabled(true); if(ConfigFlag.GEN.USE_ORDERING_HOSPITAL_LOCATION.getValue()) { CareContextVo careContextVo = (CareContextVo)form.grdList().getValue(); if(careContextVo!=null) { form.cmbOrderingHosp().setValue(careContextVo.getOrderingHospital()); // form.cmbOrderingHosp().setEnabled(false); //WDEV-11840 bindWardCombo(careContextVo); } } } //WDEV-11840 updateControlsState(); }
private void setPatientSummaryGlobalContexts(ValueObject value) { form.getGlobalContext().Core.setCurrentCareContext(null); // Care Context if (value instanceof CareContextVo) { form.getGlobalContext().Core.setCurrentCareContext((CareContextVo) value); } }
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent) { DomainFactory factory=getDomainFactory(); ArrayList<String> objects=new ArrayList<String>(); objects.add("pasEvent"); IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory); imsc.equal("pasEvent.id", pasEvent.getID_PASEvent()); List careContexts=imsc.find(); if (careContexts.size()>0) { CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1); return CareContextVoAssembler.create(careContext); } return null; }
private EpisodeofCareShortVo updateEpisodeOfCareSpecialty(CatsReferralWizardVo catsReferralVo, ReferralLetterDetailsVo referralDetailsVo, DomainFactory factory) throws StaleObjectException { CareContextVo voCC = CareContextVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, catsReferralVo.getCareContext().getID_CareContext())); ServiceVo voServ = ServiceVoAssembler.create((ims.core.clinical.domain.objects.Service) getDomainFactory().getDomainObject(ims.core.clinical.domain.objects.Service.class, referralDetailsVo.getService().getID_Service())); EpisodeOfCare doEOC = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, voCC.getEpisodeOfCare().getID_EpisodeOfCare()); if (doEOC != null) { //WDEV-11535 - if referral service.specialty is null set it back to DAD Specialty spec = null; if(voServ.getSpecialty() == null) spec = Specialty.DAD; else spec = voServ.getSpecialty(); doEOC.setSpecialty(getDomLookup(spec)); factory.save(doEOC); return EpisodeofCareShortVoAssembler.create(doEOC); } return null; }
private void browserRecord() { clearInstanceControls(); form.getLocalContext().setHomeVisitVo(null); if(form.recbrContact().getValue() instanceof HomeVisitShortVo) { form.getLocalContext().setHomeVisitVo(domain.getHomeVisit((HomeVisitRefVo) form.recbrContact().getValue())); } if(form.recbrContact().getValue() instanceof ClinicalContactShortVo) { form.getLocalContext().setHomeVisitVo(domain.getHomeVisitAccByClinicalContact((ClinicalContactRefVo) form.recbrContact().getValue())); } if(form.recbrContact().getValue() instanceof CareContextVo) { form.getLocalContext().setHomeVisitVo(domain.getHomeVisitAccByCareContext((CareContextRefVo) form.recbrContact().getValue())); } populateScreen(); isRecordEditable(); }
private String createDischargeDisplayString(CareContextVo vo) { String strCareContext = vo.getStartDateTimeIsNotNull() ? vo.getStartDateTime().toString() : ""; if (vo.getEndDateTimeIsNotNull()) { strCareContext += " - "; strCareContext += vo.getEndDateTime().toString(); } if (vo.getDischargeReasonIsNotNull()) { strCareContext += " - "; strCareContext += vo.getDischargeReason().toString(); } return strCareContext; }
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext) { if (careContext == null) return false; if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus())) return false; if (careContext.getClinicalContacts() != null) { for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts()) { if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus())) return false; } } return true; }
protected boolean chekIfCareContextsAreNotOpened(CareContextVo carecontext) { if (carecontext == null) return false; if (carecontext.getCurrentStatus() == null || CareContextStatus.OPEN.equals(carecontext.getCurrentStatus().getStatus()))// WDEV-14910 return false; else { for (int j = 0; carecontext.getClinicalContactsIsNotNull() && j < carecontext.getClinicalContacts().size(); j++) { if (checkIfClinicalContactsAreNotOpened(carecontext.getClinicalContacts().get(j)) == false) return false; } } return true; }
@Override // wdev-13896 protected void onDyngrdListCellButtonClicked(DynamicGridCell cell) { DynamicGridRow row = cell.getRow(); if (row.getValue() instanceof EpisodeofCareVo) { form.getGlobalContext().Clinical.setEpisodeOfCareWithHistory(domain.getEpisodeOfCareWithHistory((EpisodeofCareVo) row.getValue())); engine.open(form.getForms().Core.EpisodeOfCareHistoryDialog); } else if (row.getValue() instanceof CareContextVo) { form.getGlobalContext().Clinical.setCareContextWithHistory(domain.getCareContextWithHistory((CareContextVo) row.getValue())); engine.open(form.getForms().Core.CareContextHistoryDialog); } }
private void showHistoryButtonForCareContextInGrid() { CareContextRefVoCollection refCareContextColl = form.getLocalContext().getCareContextCollection(); if(refCareContextColl != null && refCareContextColl.size() > 0) { grdListRow[] rowVectColl = form.grdList().getAllRows(); for(int k = 0; k < rowVectColl.length;k++) { if(rowVectColl[k].getValue() instanceof CareContextVo) { CareContextVo voCare = (CareContextVo) rowVectColl[k].getValue(); for(int i = 0; i < refCareContextColl.size();i++) { if(voCare != null && voCare.getID_CareContextIsNotNull() && voCare.getID_CareContext().equals(refCareContextColl.get(i).getID_CareContext())) { rowVectColl[k].setColumnHistoryEmpty(false); // WDEV-17175 rowVectColl[k].setTooltipForColumnHistory("History"); //WDEV-14021 ,wdev-16293 } } } } } }
protected boolean chekIfCareContextsAreNotOpened(CareContextVo carecontext) { if( carecontext == null) return false; if( carecontext.getCurrentStatus() == null || CareContextStatus.OPEN.equals(carecontext.getCurrentStatus().getStatus()))// WDEV-14910 return false; else { for(int j = 0;carecontext.getClinicalContactsIsNotNull() && j < carecontext.getClinicalContacts().size();j++) { if( checkIfClinicalContactsAreNotOpened(carecontext.getClinicalContacts().get(j)) == false) return false; } } return true; }
protected void populateScreenFromData(PatientProcedureProcsComponentVo voPatProc) { if (voPatProc == null) return; Object hcpLite = domain.getHcpLiteUser(); CareContextVo careContextVO = domain.getCareContext(voPatProc.getCareContext()); form.ctnDetails().lblResponsible().setValue(hcpLite != null ? (((HcpLiteVo) hcpLite).getName() != null ? ((HcpLiteVo) hcpLite).getName().toString() : null) : null); if (careContextVO != null) form.ctnDetails().lblResponsible().setValue(careContextVO.getResponsibleHCPIsNotNull() ? careContextVO.getResponsibleHCP().getIHcpName() : null); form.ctnDetails().ccProcedure().setValue((IClinicalCodingValue) voPatProc); // Set performed by value form.ctnDetails().ccPerformedBy().clear(); form.ctnDetails().ccPerformedBy().setValue(voPatProc.getPeformedBy()); form.ctnDetails().pdtPerformed().setValue(voPatProc.getProcDateIsNotNull() ? voPatProc.getProcDate() : null); form.ctnDetails().timProc().setValue(voPatProc.getProcTimeIsNotNull() ? voPatProc.getProcTime() : null); form.ctnDetails().cmbLaterality().setValue(voPatProc.getProcLateralityIsNotNull() ? voPatProc.getProcLaterality() : null); form.ctnDetails().txtSite().setValue(voPatProc.getSiteTextIsNotNull() ? voPatProc.getSiteText() : null); if (voPatProc.getAuthoringInformationIsNotNull()) form.ctnDetails().ccAuthor().setValue(voPatProc.getAuthoringInformation()); setResponsibleHcp(voPatProc.getCareContext()); }
private void search() { if (form.cmbMDTList().getValue() == null) { engine.showMessage("Valid search criteria must be specified - Please select a List"); return; } form.getGlobalContext().Core.setCurrentMDTListShown(form.cmbMDTList().getValue()); MDTListAndDatesVo voMdtListFilter = new MDTListAndDatesVo(); MDTListAndDatesVoCollection mdtColl = null; voMdtListFilter.setCareContext(new CareContextVo()); voMdtListFilter.getCareContext().setContext(ContextType.INPATIENT); voMdtListFilter.setListPatientisOn(form.cmbMDTList().getValue()); if ((form.cmbMDTList().getValue() != null) && (form.cmbMDTList().getValue().equals(MDTListAorB.NOTONANYLISTYET))) mdtColl = domain.listCareContextsWithNoMDTList(voMdtListFilter); else if (form.cmbMDTList().getValue() != null) mdtColl = domain.listMDT(voMdtListFilter); populateListControl(mdtColl); }
private CareContextVo copyFromShortCareContext(CareContextWithoutClicalContactsVo careContext) { if (careContext == null) return null; CareContextVo tempVo = new CareContextVo(careContext.getID_CareContext(), careContext.getVersion_CareContext()); tempVo.setID_CareContext(careContext.getID_CareContext()); tempVo.setBedNumber(careContext.getBedNumber()); tempVo.setCareContextHistory(careContext.getCareContextHistory()); tempVo.setContext(careContext.getContext()); tempVo.setCurrentStatus(careContext.getCurrentStatus()); tempVo.setDischargeReason(careContext.getDischargeReason()); tempVo.setEndDateTime(careContext.getEndDateTime()); tempVo.setEpisodeOfCare(careContext.getEpisodeOfCare()); tempVo.setEstimatedDischargeDate(careContext.getEstimatedDischargeDate()); tempVo.setIsRIE(careContext.getIsRIE()); tempVo.setLocationType(careContext.getLocationType()); tempVo.setOrderingHospital(careContext.getOrderingHospital()); tempVo.setPasEvent(careContext.getPasEvent()); tempVo.setResponsibleHCP(careContext.getResponsibleHCP()); tempVo.setStartDateTime(careContext.getStartDateTime()); tempVo.setStatusHistory(careContext.getStatusHistory()); tempVo.setClinicalContacts(new ClinicalContactShortVoCollection()); return tempVo; }
private CareContextVo copyFromShortCareContext(CareContextWithoutClicalContactsVo careContext) { if(careContext == null) return null; CareContextVo tempVo = new CareContextVo(careContext.getID_CareContext(),careContext.getVersion_CareContext()); tempVo.setID_CareContext(careContext.getID_CareContext()); tempVo.setBedNumber(careContext.getBedNumber()); tempVo.setCareContextHistory(careContext.getCareContextHistory()); tempVo.setContext(careContext.getContext()); tempVo.setCurrentStatus(careContext.getCurrentStatus()); tempVo.setDischargeReason(careContext.getDischargeReason()); tempVo.setEndDateTime(careContext.getEndDateTime()); tempVo.setEpisodeOfCare(careContext.getEpisodeOfCare()); tempVo.setEstimatedDischargeDate(careContext.getEstimatedDischargeDate()); tempVo.setIsRIE(careContext.getIsRIE()); tempVo.setLocationType(careContext.getLocationType()); tempVo.setOrderingHospital(careContext.getOrderingHospital()); tempVo.setPasEvent(careContext.getPasEvent()); tempVo.setResponsibleHCP(careContext.getResponsibleHCP()); tempVo.setStartDateTime(careContext.getStartDateTime()); tempVo.setStatusHistory(careContext.getStatusHistory()); tempVo.setClinicalContacts(new ClinicalContactShortVoCollection()); return tempVo; }