private void fillDocumentWorklistSearchCriteria() { DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo(); criteria.setLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue()); criteria.setClinic(form.lyrLetterCreate().tabClinicList().qmbClinic().getValue()); criteria.setAuthor(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccAuth().getValue() : null); criteria.setResponsible(form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() : null); criteria.setTypist(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.lyrLetterCreate().tabTemplate().ccTypist().getValue() : null); criteria.setSpecialty(form.lyrLetterCreate().tabTemplate().cmbSpecialty().getValue()); //criteria.setDateFrom(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue()); WDEV-12721 //criteria.setDateTo(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue()); WDEV-12721 criteria.setDateFrom(form.getLocalContext().getMinDate()); //WDEV-12721 criteria.setDateTo(form.getLocalContext().getMaxDate()); //WDEV-12721 form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria); }
private void fillDocumentWorklistSearchCriteria() { DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo(); criteria.setAuthor(form.ccAuthoring().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccAuthoring().getValue() : null); criteria.setResponsible(form.ccResponsibleHcp().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccResponsibleHcp().getValue() : null); criteria.setTypist(form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null); criteria.setSpecialty(form.cmbSpecialty().getValue()); criteria.setDateFrom(form.dteDocumentDate().getValue()); criteria.setDateTo(form.dteDocumentDate().getValue()); form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria); }
private void populateSearchCriteriaScreenFromData(DocumentWorklistSearchCriteriaVo criteria) { clearScreen(); if (criteria == null) return; form.ccResponsible().setValue(criteria.getResponsible()); form.ccAuthor().setValue(criteria.getAuthor()); form.ccTypist().setValue(criteria.getTypist()); form.cmbLocation().setValue(criteria.getLocation()); if (criteria.getClinicIsNotNull()) { form.qmbClinic().newRow(criteria.getClinic(), criteria.getClinic().getClinicName()); form.qmbClinic().setValue(criteria.getClinic()); } form.cmbDocStatus().setValue(criteria.getDocumentStatus()); form.cmbDocType().setValue(criteria.getDocumentType()); form.cmbSpecialty().setValue(criteria.getSpecialty()); form.dteFrom().setValue(criteria.getDateFrom()); form.dteTo().setValue(criteria.getDateTo()); form.chkExcludeCompleted().setValue(criteria.getExcludeCompleted()); //WDEV-11810 Start if (criteria.getPatientIdIsNotNull()) { form.cmbIdType().setValue(criteria.getPatientId().getType()); form.txtPatId().setValue(criteria.getPatientId().getValue()); } if (ConfigFlag.UI.DOCUMENT_WORKLIST_DISPLAY_VIEW_DOCUMENTS_FOR_PATIENT_CHECKBOX.getValue() && form.getGlobalContext().Core.getPatientShortIsNotNull() && criteria.getPatientIsNotNull())//WDEV-13794 { form.chkPatOnly().setValue(true); } //WDEV-11810 End }
private DocumentWorklistSearchCriteriaVo populateSearchCriteriaDataFromScreen() { DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo(); criteria.setResponsible(form.ccResponsible().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccResponsible().getValue() : null); criteria.setAuthor(form.ccAuthor().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccAuthor().getValue() : null); criteria.setTypist(form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null); criteria.setLocation(form.cmbLocation().getValue()); criteria.setClinic(form.qmbClinic().getValue()); criteria.setDocumentStatus(form.cmbDocStatus().getValue()); criteria.setDocumentType(form.cmbDocType().getValue()); criteria.setSpecialty(form.cmbSpecialty().getValue()); criteria.setDateFrom(form.dteFrom().getValue()); criteria.setDateTo(form.dteTo().getValue()); criteria.setExcludeCompleted(form.chkExcludeCompleted().getValue()); //WDEV-11810 criteria.setHospNo(form.txtHospNo().getValue()); //WDEV-11810 Start criteria.setPatient(form.chkPatOnly().getValue()?form.getGlobalContext().Core.getPatientShort():null); if (form.txtPatId().getValue()!=null) { PatientIdListVo patId = new PatientIdListVo(); patId.setType(form.cmbIdType().getValue()); patId.setValue(form.txtPatId().getValue()); criteria.setPatientId(patId); } //WDEV-11810 End return criteria; }
private boolean doSearch(boolean showErrors) { form.grdDocuments().getRows().clear(); if (isSearchCriteriaValid(showErrors)) { DocumentWorklistSearchCriteriaVo searchFilter = populateSearchCriteriaDataFromScreen(); populateScreenFromData(domain.listPatientDocuments(searchFilter)); if (searchFilter != null && searchFilter.getColumnSortOrder() != null) { setSortOrderForColumn(searchFilter.getColumnSortOrder().getColumnId(), searchFilter.getColumnSortOrder().getSortOrder()); } if (form.getLocalContext().getSelectedDocumentIsNotNull()) { form.grdDocuments().setValue(getRowValueFromGrid(form.getLocalContext().getSelectedDocument())); gridSelectionChanged(); } if (form.grdDocuments().getRows().size() == 0 && showErrors) engine.showMessage("No documents found."); return true; } return false; }
private void populateSearchCriteriaScreenFromData(DocumentWorklistSearchCriteriaVo criteria) { clearScreen(); if (criteria == null) return; form.ccResponsible().setValue(criteria.getResponsible()); form.ccAuthor().setValue(criteria.getAuthor()); form.ccTypist().setValue(criteria.getTypist()); form.cmbLocation().setValue(criteria.getLocation()); if (criteria.getClinicIsNotNull()) { form.qmbClinic().newRow(criteria.getClinic(), criteria.getClinic().getClinicName()); form.qmbClinic().setValue(criteria.getClinic()); } form.cmbDocStatus().setValue(criteria.getDocumentStatus()); form.cmbDocType().setValue(criteria.getDocumentType()); form.cmbSpecialty().setValue(criteria.getSpecialty()); form.dteFrom().setValue(criteria.getDateFrom()); form.dteTo().setValue(criteria.getDateTo()); form.chkExcludeCompleted().setValue(criteria.getExcludeCompleted()); //WDEV-11810 Start if (criteria.getPatientIdIsNotNull()) { form.cmbIdType().setValue(criteria.getPatientId().getType()); form.txtPatId().setValue(criteria.getPatientId().getValue()); } if (ConfigFlag.UI.DOCUMENT_WORKLIST_DISPLAY_VIEW_DOCUMENTS_FOR_PATIENT_CHECKBOX.getValue() && form.getGlobalContext().Core.getPatientShortIsNotNull() && criteria.getPatientIsNotNull())//WDEV-13794 { form.chkPatOnly().setValue(true); } //WDEV-11810 End setSearchDateIntervalType(criteria.getSearchTypeIsNotNull() ? criteria.getSearchType() : EVENT_DATE); // WDEV-18652 }
private void initialize(Object[] args) throws PresentationLogicException { if (!(domain.getMosUser() instanceof MemberOfStaffShortVo)) throw new PresentationLogicException("You must be a member of staff to open this form."); //WDEV-12643 if(!ConfigFlag.UI.CORRESPONDENCE_KEEP_PATIENT_SELECTED.getValue() && (args == null || args.length == 0 || !NEW_DOCUMENT.equals(args[0])))// WDEV-13794 form.getGlobalContext().Core.setPatientShort(null); //WDEV-13634 removeFromCategoryLookup(); form.ccResponsible().initialize(MosType.HCP); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());//WDEV-11810 form.cmbIdType().setValue(dispIdType); boolean isHCP = false;//WDEV-13909 form.ccAuthor().initialize(MosType.HCP); if (domain.getHcpLiteUser() instanceof HcpLiteVo) { form.ccAuthor().setValue((HcpLiteVo) domain.getHcpLiteUser()); isHCP = true;//WDEV-13909 } form.ccTypist().initialize(MosType.ALL); if (!isHCP && domain.getMosUser() instanceof MemberOfStaffShortVo)//WDEV-13909 { form.ccTypist().setValue((MemberOfStaffShortVo) domain.getMosUser()); } populateDocumentStatus(); populateDefaultValuesInSearchCriteria(); populateLocations(); //WDEV-12643, WDEV-13794 if(ConfigFlag.UI.CORRESPONDENCE_KEEP_PATIENT_SELECTED.getValue()) initClearCheckBox(); if (form.getGlobalContext().Core.getPatientShortIsNotNull() && form.getGlobalContext().Core.getDocumentWorklistSearchCriteria() == null) //WDEV-12510 { //WDEV-11810 String hospNo = null; //WDEV-11810 if ((hospNo = getHospNo(form.getGlobalContext().Core.getPatientShort())) != null) //WDEV-11810{ form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(new DocumentWorklistSearchCriteriaVo()); form.getGlobalContext().Core.getDocumentWorklistSearchCriteria().setPatient(form.getGlobalContext().Core.getPatientShort()); form.getGlobalContext().Core.getDocumentWorklistSearchCriteria().setExcludeCompleted(true); //WDEV-11810} } form.grdDocuments().setAuthorCaption(ConfigFlag.UI.DISPLAY_AUTHORINGHCP_OR_RESPHCP_ON_DOCUMENT_WORKLIST.getValue().equals("Responsible HCP")?"Responsible":"Author"); }
private void initialize(Object[] args) throws PresentationLogicException { if (!(domain.getMosUser() instanceof MemberOfStaffShortVo)) throw new PresentationLogicException("You must be a member of staff to open this form."); //WDEV-12643 if(!ConfigFlag.UI.CORRESPONDENCE_KEEP_PATIENT_SELECTED.getValue() && (args == null || args.length == 0 || !NEW_DOCUMENT.equals(args[0])))// WDEV-13794 form.getGlobalContext().Core.setPatientShort(null); //WDEV-13634 //removeFromCategoryLookup(); DocumentCategoryToFormCfgVo documentCategoryConfig = domain.getDocumentCategoryConfig(form.getForms().Core.DocumentWorklist.getID()); if(documentCategoryConfig != null && documentCategoryConfig.getDocumentCategory() != null && documentCategoryConfig.getDocumentCategory().size() > 0) { bindDocumentCategory(documentCategoryConfig.getDocumentCategory()); } else { DocumentCategoryCollection lookupCollection = LookupHelper.getDocumentCategory(domain.getLookupService()); bindDocumentCategory(lookupCollection); } form.ccResponsible().initialize(MosType.HCP); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());//WDEV-11810 form.cmbIdType().setValue(dispIdType); boolean isHCP = false;//WDEV-13909 form.ccAuthor().initialize(MosType.HCP); if (domain.getHcpLiteUser() instanceof HcpLiteVo) { form.ccAuthor().setValue((HcpLiteVo) domain.getHcpLiteUser()); isHCP = true;//WDEV-13909 } form.ccTypist().initialize(MosType.ALL); if (!isHCP && domain.getMosUser() instanceof MemberOfStaffShortVo)//WDEV-13909 { form.ccTypist().setValue((MemberOfStaffShortVo) domain.getMosUser()); } populateDocumentStatus(); // WDEV-18652 - start form.GroupSearchDateInterval().setValue(GroupSearchDateIntervalEnumeration.rdoGeneratedDate); populateDefaultValuesInSearchCriteria(ConfigFlag.UI.DOCUMENT_WORKLIST_DEFAULT_GENERATED_START_DATE_INTERVAL.getValue(), true); // WDEV-18652 - end populateLocations(); //WDEV-12643, WDEV-13794 if(ConfigFlag.UI.CORRESPONDENCE_KEEP_PATIENT_SELECTED.getValue()) initClearCheckBox(); if (form.getGlobalContext().Core.getPatientShortIsNotNull() && form.getGlobalContext().Core.getDocumentWorklistSearchCriteria() == null) //WDEV-12510 { //WDEV-11810 String hospNo = null; //WDEV-11810 if ((hospNo = getHospNo(form.getGlobalContext().Core.getPatientShort())) != null) //WDEV-11810{ form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(new DocumentWorklistSearchCriteriaVo()); form.getGlobalContext().Core.getDocumentWorklistSearchCriteria().setPatient(form.getGlobalContext().Core.getPatientShort()); form.getGlobalContext().Core.getDocumentWorklistSearchCriteria().setExcludeCompleted(true); //WDEV-11810} } form.grdDocuments().setAuthorCaption(ConfigFlag.UI.DISPLAY_AUTHORINGHCP_OR_RESPHCP_ON_DOCUMENT_WORKLIST.getValue().equals("Responsible HCP")?"Responsible":"Author"); //WDEV-20193 form.grdDocuments().setAuthorHeaderTooltip(ConfigFlag.UI.DISPLAY_AUTHORINGHCP_OR_RESPHCP_ON_DOCUMENT_WORKLIST.getValue().equals("Responsible HCP")?"Responsible":"Author"); }