private boolean save() { PatientDocumentVo vo = populatePatientDocumentVo(populateServetDocumentVo()); String[] str = vo.validate(); if (str != null && str.length > 0) { engine.showErrors(str); return false; } if (form.getLocalContext().getUploadDocumentStoreLevelIsNotNull()) { if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.REFERRAL)) { if (!saveDocAtReferralLevel(vo)) return false; } else if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.CARECONTEXT) ||form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.EPISODEOFCARE) ||form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.PATIENT)) { try { PatientDocumentSaveVo voSave = domain.savePatientDocument(vo, null, null); form.getGlobalContext().Core.setPatientDocument(voSave.getPatientDocumentVo()); } catch (StaleObjectException e) { catchErrors(e.toString(), SystemLogLevel.ERROR); return false; } } engine.close(DialogResult.OK); return true; } return false; }
public void initialize(DocumentCategory category, UploadDocumentStoreLevel documentStoreLevel,DocumentViewLevel documentViewLevel) { form.getLocalContext().setDocumentCategory(category); form.getLocalContext().setUploadDocumentStoreLevel(documentStoreLevel); form.getLocalContext().setDocumentViewLevel(documentViewLevel); open(); updateControlsStates(); }
private boolean areWeAtMinimumLevelToScanImport() { if (!form.getLocalContext().getUploadDocumentStoreLevelIsNotNull()) return false; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.CARECONTEXT) && form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.EPISODEOFCARE) && form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.PATIENT) && form.getGlobalContext().Core.getPatientShortIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.REFERRAL) && form.getGlobalContext().RefMan.getCatsReferralIsNotNull()) return true; return false; }
private UploadDocumentStoreLevel getMinContextForScanImport() { String value = ConfigFlag.GEN.MINIMUM_CONTEXT_REQUIRED_TO_SCAN_OR_IMPORT.getValue(); if (value == null) return UploadDocumentStoreLevel.NONE; if (value.equals(UploadDocumentStoreLevel.CARECONTEXT.getText())) return UploadDocumentStoreLevel.CARECONTEXT; if (value.equals(UploadDocumentStoreLevel.EPISODEOFCARE.getText())) return UploadDocumentStoreLevel.EPISODEOFCARE; if (value.equals(UploadDocumentStoreLevel.PATIENT.getText())) return UploadDocumentStoreLevel.PATIENT; if (value.equals(UploadDocumentStoreLevel.REFERRAL.getText())) return UploadDocumentStoreLevel.REFERRAL; return UploadDocumentStoreLevel.NONE; }
private void openDialog() { displayDocument(false); //WDEV-16361 if (engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.ClinicalOrdersResultsOCRRForm)) engine.open(form.getForms().Core.UploadDocumentDialog, new Object[]{UploadDocumentStoreLevel.PATIENT}); else engine.open(form.getForms().Core.UploadDocumentDialog, new Object[]{UploadDocumentStoreLevel.REFERRAL}); }
private void initialze() { form.lyr1().tabPagePresentationComp().ccPresentationComp().initialize(); form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL); form.getGlobalContext().setPresentationReferalSummaryChanged(false); form.getLocalContext().setPresentationReferralSummaryvo(null); }
protected void onlyr1TabChanged(LayerBridge tab) { if (tab.equals(form.lyr1().tabPagePresentationComp())) { if(form.getLocalContext().getPresentationReferralSummaryvoIsNotNull()) { populatePresentationTab(form.getLocalContext().getPresentationReferralSummaryvo()); } else { PresentationReferralSummaryVo refSummary = domain.getPresentationReferralSummary(form.getGlobalContext().RefMan.getCatsReferral()); form.getLocalContext().setPresentationReferralSummaryvo(refSummary); populatePresentationTab(refSummary); } } else if (tab.equals(form.lyr1().tabPageLetter())) { try { form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242 } catch (RuntimeException e) { engine.showMessage(e.toString()); } } }
private void tabUploadChange() { try { form.lyrPage().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL); //form.getGlobalContext().RefMan.setCatsReferralWizard(form.getLocalContext().getRecord()); //ADDED FOR WDEV-7474 GlobalContext CatsRefferralWizard could be saved by upload document and you //must be sure that the CatsRefferalWizard has the latest version //form.getGlobalContext().RefMan.setCatsReferralWizard(domain.getCatsReferral(form.getLocalContext().getRecord())); } catch (RuntimeException e) { engine.showMessage(e.toString()); } }
@Override protected void onBtnViewReferralDocumentsClick() throws PresentationLogicException { if (form.lyrTriage().tabPageTriage().isVisible()) { form.lyrTriage().tabPageTriage().htmDocument().setHTML(""); } form.getGlobalContext().Core.setPatientShort(domain.getPatient(form.getLocalContext().getCurrentCatsReferral().getPatient())); engine.open(form.getForms().Core.ViewDocuments,new Object[]{FormMode.EDIT, null,UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL } ); }
private void initialise(FormMode formMode) { form.getLocalContext().setSelectedDocument(null); form.ccDocuments().initialize(null, UploadDocumentStoreLevel.PATIENT, DocumentViewLevel.CLINICALREFERRAL); form.ccDocuments().setMode(formMode); }
private boolean areWeAtMinimumLevelToScanImport() { if (!form.getLocalContext().getUploadDocumentStoreLevelIsNotNull()) return false; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.CARECONTEXT) && form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.EPISODEOFCARE) && form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.PATIENT) && form.getGlobalContext().Core.getPatientShortIsNotNull()) return true; if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.REFERRAL) && form.getGlobalContext().CareUk.getCatsReferralIsNotNull()) return true; return false; }
private void initialise() { if (ConfigFlag.GEN.SHOW_REFERRAL_DETAILS_BILLING_TABS.getValue()) { form.lyrDetail().tabPayerDetails().Group1().setValue(Group1Enumeration.rdoInsurance); form.lyrDetail().tabPayerDetails().setHeaderVisible(true); form.lyrDetail().tabPayerDetails().setHeaderEnabled(true); form.lyrDetail().tabContractDetails().setHeaderVisible(true); form.lyrDetail().tabContractDetails().setHeaderEnabled(true); } else { form.lyrDetail().tabPayerDetails().setHeaderVisible(false); form.lyrDetail().tabPayerDetails().setHeaderEnabled(false); form.lyrDetail().tabContractDetails().setHeaderVisible(false); form.lyrDetail().tabContractDetails().setHeaderEnabled(false); } form.lyrDetail().showtabOverview(); form.lyrDetail().tabOverview().ccReferralOverviewAndKpis().initialize(form.getGlobalContext().RefMan.getCatsReferral()); form.lyrDetail().tabOverview().ccReferralOverviewAndKpis().setMode(FormMode.VIEW); form.getLocalContext().setSelectedTab(ReferralDetailsSelectedTab.OVERVIEW); form.lyrDetail().tabDetails().ccDetails().initialize(CALLINGFORM.REFERRALDETAILS); form.lyrDetail().tabDetails().ccDetails().setMode(FormMode.VIEW); //wdev-7998 if (ConfigFlag.GEN.SHOW_PRESENTATION_TAB.getValue()) form.lyrDetail().tabPresentation().ccPresentation().initialize(); else form.lyrDetail().tabPresentation().setHeaderVisible(false); form.lyrDetail().tabAppt().ccApptDetail().initialise(engine.hasRight(AppRight.ALLOW_ORDERINVESTIGATIONS_CAREUK)); form.getGlobalContext().RefMan.setCatsReferralHasGpLetter(null); form.lyrDetail().tabLetter().ccUpload().initialize(null, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242 form.getGlobalContext().RefMan.setRejectionReason(null); form.getGlobalContext().RefMan.setSecondOpinionReferralStatus(null); //form.lyrDetail().tabOnwardReferral().setVisible(false); //WDEV-12736 }
private void initialiseTabs() { form.lyr1().tabReferralLetter().customControlUploadDoc().initialize(null, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL); form.lyr1().tabReferralLetter().customControlUploadDoc().setMode(FormMode.EDIT); form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.DOCS); }
@Override protected void onlyr1TabChanged(LayerBridge tab) { boolean isProviderCancellation = form.getGlobalContext().RefMan.getIsProviderCancellationIsNotNull() && form.getGlobalContext().RefMan.getIsProviderCancellation(); if (tab.equals(form.lyr1().tabReferralLetter())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.DOCS); form.lyr1().tabReferralLetter().customControlUploadDoc().initialize(null, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);////WDEV-12242 } else if (tab.equals(form.lyr1().tabReferralAppts())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.APPTS); form.lyr1().tabReferralAppts().ccAppts().initialise(engine.hasRight(AppRight.ALLOW_ORDERINVESTIGATIONS_CAREUK)); populateApptDetailComponent(); } else if (tab.equals(form.lyr1().tabBaselineObs())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.BASELINEOBS); form.lyr1().tabBaselineObs().ccNursingNotes().initialize(); } else if (tab.equals(form.lyr1().tabPrescription())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.PRESCRIPTION); form.lyr1().tabPrescription().ccPrescription().initialize(isProviderCancellation, null); } else if (tab.equals(form.lyr1().tabAssesments())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.ASSESSMENTS); form.lyr1().tabAssesments().ccPatientSpecialtyAssessments().initialize(); } else if (tab.equals(form.lyr1().tabInvestigations())) { form.lyr1().tabInvestigations().ccInvestigations().initialise(engine.hasRight(AppRight.CAN_VIEW_CONFIDENTIAL_INVESTIGATION_RESULTS), engine.hasRight(AppRight.CAN_VIEW_CONFIDENTIAL_INVESTIGATIONS_ORDERED), Boolean.TRUE); } else if (tab.equals(form.lyr1().tabOutcome())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.OUTCOME); form.lyr1().tabOutcome().ccOutcome().initialize(isProviderCancellation,null,null,null); } else if (tab.equals(form.lyr1().tabDischarge())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.OUTCOME); buildFinalReport(); } else if(tab.equals(form.lyr1().tabClinicalNotes())) { form.getLocalContext().setSelectedTab(AtConsultationSelectedTab.CLINICALNOTES); form.lyr1().tabClinicalNotes().ccClinicalNotes().initialize(isProviderCancellation); } else if (tab.equals(form.lyr1().tabNotes())) { form.lyr1().tabNotes().ccNote().initialize(); } else if (tab.equals(form.lyr1().tabSpecimenCollection())) { form.lyr1().tabSpecimenCollection().ccSpecimenCollection().initialize(); } }
protected void onlyr1TabChanged(LayerBridge tab) { boolean isProviderCancellation = form.getGlobalContext().RefMan.getIsProviderCancellationIsNotNull() && form.getGlobalContext().RefMan.getIsProviderCancellation(); if (form.getGlobalContext().RefMan.getIsComponentInEditModeIsNotNull() && form.getGlobalContext().RefMan.getIsComponentInEditMode().equals(FormMode.EDIT)) { return; } if (tab.equals(form.lyr1().tabPatientDocuments())) { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.PATIENT_DOCUMENTS); form.lyr1().tabPatientDocuments().ccDocuments().initialize(null, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242 } else if(tab.equals(form.lyr1().tabClinicalNote()))//WDEV-13943 { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.CLINICAL_NOTES); form.lyr1().tabClinicalNote().ccClinicalNote().initialize(isProviderCancellation); } else if (tab.equals(form.lyr1().tabPrescription())) { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.PRESCRIPTIONS); form.lyr1().tabPrescription().ccPrescription().initialize(isProviderCancellation, null); } else if (tab.equals(form.lyr1().tabOutcome())) { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.OUTCOME); form.lyr1().tabOutcome().ccOutcome().initialize(isProviderCancellation,null,null,null); } else if (tab.equals(form.lyr1().tabTLT())) { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.TLT); form.lyr1().tabTLT().lyrTLT().tabPageTLTNotes().ccTLT().initialize(isProviderCancellation, null); if (form.lyr1().tabTLT().lyrTLT().tabPageTLTOutcome().isVisible()) { openTLTOutcome(); } } else if (tab.equals(form.lyr1().tabFinalReport())) { form.getLocalContext().setSelectedTab(OnExaminationSelectedTab.FINAL_REPORT); buildFinalReport(); } }
public PatientDocumentLiteVoCollection listPatientDocuments(PatientRefVo patient, CareContextRefVo context,DocumentCategory documentCategory, CatsReferralRefVo refVo, UploadDocumentStoreLevel level) { if(patient == null || (patient != null && patient.getID_Patient() == null)) throw new DomainRuntimeException("Cannot get PatientDocumentVoCollection for null PatientRefVo"); if (level == null) throw new DomainRuntimeException("Document Store Level cannot be null"); DomainFactory factory = getDomainFactory(); String mainHql = ""; String hql = ""; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " where "; if (level.equals(UploadDocumentStoreLevel.REFERRAL)) { if (refVo != null) { mainHql = "select pd from CatsReferral catsref "; mainHql +=(" left join catsref.referralDocuments as pd "); andStr = " where "; hql += (andStr + " catsref.id = :idCatsRef "); markers.add("idCatsRef"); values.add(refVo.getID_CatsReferral()); andStr = " and "; mainHql +=(" left join pd.patient as p"); hql += andStr + " p.id = :idPatient "; markers.add("idPatient"); values.add(patient.getID_Patient()); } else { return null; } } else if (level.equals(UploadDocumentStoreLevel.CARECONTEXT)) { mainHql = "select pd from PatientDocument pd "; mainHql +=(" left join pd.patient as p"); hql += andStr + " p.id = :idPatient "; markers.add("idPatient"); values.add(patient.getID_Patient()); if (context != null) { andStr = " and "; hql += andStr + " pd.careContext.id = :idCareContext"; markers.add("idCareContext"); values.add(context.getID_CareContext()); } } else if (level.equals(UploadDocumentStoreLevel.PATIENT)) { mainHql = "select pd from PatientDocument pd "; mainHql +=(" left join pd.patient as p"); hql += andStr + " p.id = :idPatient "; markers.add("idPatient"); values.add(patient.getID_Patient()); } mainHql += hql; List documents = factory.find(mainHql,markers,values); return PatientDocumentLiteVoAssembler.createPatientDocumentLiteVoCollectionFromPatientDocument(documents); }
private boolean save() { PatientDocumentVo vo = populatePatientDocumentVo(populateServetDocumentVo()); String[] str = vo.validate(); if (str != null && str.length > 0) { engine.showErrors(str); return false; } if (form.getLocalContext().getUploadDocumentStoreLevelIsNotNull()) { if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.REFERRAL)) { if (!saveDocAtReferralLevel(vo)) return false; } else if (form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.CARECONTEXT) ||form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.EPISODEOFCARE) ||form.getLocalContext().getUploadDocumentStoreLevel().equals(UploadDocumentStoreLevel.PATIENT)) { try { PatientDocumentSaveVo voSave = domain.savePatientDocument(vo, null, null); form.getGlobalContext().Core.setPatientDocument(voSave.getPatientDocumentVo()); } catch (StaleObjectException e) { catchErrors(e,e.toString(), SystemLogLevel.ERROR); return false; } } engine.close(DialogResult.OK); //WDEV-18856 if (form.getGlobalContext().Core.getPatientDocumentsCollectionForClinicalReferral() == null) { form.getGlobalContext().Core.setPatientDocumentsCollectionForClinicalReferral( new PatientDocumentVoCollection()); } form.getGlobalContext().Core.getPatientDocumentsCollectionForClinicalReferral().add(form.getGlobalContext().Core.getPatientDocument()); return true; } return false; }
private void initialise() { if (ConfigFlag.GEN.SHOW_REFERRAL_DETAILS_BILLING_TABS.getValue()) { form.lyrDetail().tabPayerDetails().Group1().setValue(Group1Enumeration.rdoInsurance); form.lyrDetail().tabPayerDetails().setHeaderVisible(true); form.lyrDetail().tabPayerDetails().setHeaderEnabled(true); form.lyrDetail().tabContractDetails().setHeaderVisible(true); form.lyrDetail().tabContractDetails().setHeaderEnabled(true); } else { form.lyrDetail().tabPayerDetails().setHeaderVisible(false); form.lyrDetail().tabPayerDetails().setHeaderEnabled(false); form.lyrDetail().tabContractDetails().setHeaderVisible(false); form.lyrDetail().tabContractDetails().setHeaderEnabled(false); } form.lyrDetail().showtabOverview(); form.lyrDetail().tabOverview().ccReferralOverviewAndKpis().initialize(form.getGlobalContext().RefMan.getCatsReferral()); form.lyrDetail().tabOverview().ccReferralOverviewAndKpis().setMode(FormMode.VIEW); form.getLocalContext().setSelectedTab(ReferralDetailsSelectedTab.OVERVIEW); form.lyrDetail().tabDetails().ccDetails().initialize(CALLINGFORM.REFERRALDETAILS); form.lyrDetail().tabDetails().ccDetails().setMode(FormMode.VIEW); //wdev-7998 if (ConfigFlag.GEN.SHOW_PRESENTATION_TAB.getValue()) form.lyrDetail().tabPresentation().ccPresentation().initialize(); else form.lyrDetail().tabPresentation().setHeaderVisible(false); form.lyrDetail().tabAppt().ccApptDetail().initialise(engine.hasRight(AppRight.ALLOW_ORDERINVESTIGATIONS_CAREUK)); form.getGlobalContext().RefMan.setCatsReferralHasGpLetter(null); form.lyrDetail().tabLetter().ccUpload().initialize(null, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242 form.getGlobalContext().RefMan.setRejectionReason(null); form.getGlobalContext().RefMan.setSecondOpinionReferralStatus(null); //form.lyrDetail().tabOnwardReferral().setVisible(false); //WDEV-12736 if (form.getGlobalContext().RefMan.getDiagnosticReferralForApplication() == null) form.getGlobalContext().RefMan.setDiagnosticReferralForApplication(domain.hasLocationDiagnosicContracts((LocationRefVo) engine.getCurrentLocation())); }