private void saveCompleteStatus() { try { form.getLocalContext().setSTHKSummaryVo(domain.saveEDischargeSummary(populateEDischargeSummary())); } catch (StaleObjectException e) { e.printStackTrace(); engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); } open(); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); form.getGlobalContext().Clinical.seteDischargeDisableTabs(false); form.fireCustomControlValueChanged(); }
private boolean saveDiagnosisRecord(PatientDiagnosisEDischargeVo voPatientDiagnosis) throws PresentationLogicException { String[] errors = voPatientDiagnosis.validate(); if (errors != null) { engine.showErrors(errors); return false; } try { voPatientDiagnosis = domain.saveDiagnosisVo(voPatientDiagnosis, null); } catch (StaleObjectException sox) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setSelectedPatientDiagnosisVo(null); form.setMode(FormMode.VIEW); enableDisableDiagnosisInstanceControls(false); open(); return false; } catch (UniqueKeyViolationException ue) { engine.showMessage(ue.getMessage()); return false; } catch (DomainInterfaceException e) { engine.showErrors(new String[] { e.getMessage() }); return false; } form.getLocalContext().setSelectedPatientDiagnosisVo(voPatientDiagnosis); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); return true; }
@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { if (save()) { open(); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); form.fireCustomControlValueChanged(); } }
@Override protected void onCcDiagnosisValueChanged() throws ims.framework.exceptions.PresentationLogicException { if(form.lyrDetails().tabPageDiagnosis().ccDiagnosis().getLastEvent() != null) { if(form.lyrDetails().tabPageDiagnosis().ccDiagnosis().getLastEvent() != null && form.lyrDetails().tabPageDiagnosis().ccDiagnosis().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) { form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageDiagnosis().ccDiagnosis().clearLastEvent(); } } updateControlState(TAB_DIAG); }
@Override protected void onCcOpsProcsValueChanged() throws ims.framework.exceptions.PresentationLogicException { if(form.lyrDetails().tabPageOpsProcs().ccOpsProcs().getLastEvent() != null) { if(form.lyrDetails().tabPageOpsProcs().ccOpsProcs().getLastEvent() != null && form.lyrDetails().tabPageOpsProcs().ccOpsProcs().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) { form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageOpsProcs().ccOpsProcs().clearLastEvent(); } } updateControlState(TAB_OPS); }
@Override protected void onCcReadyValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPageReady().ccReady().getLastEvent() != null && form.lyrDetails().tabPageReady().ccReady().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) { form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageReady().ccReady().clearLastEvent(); } updateControlState(TAB_READY); /* if (form.getGlobalContext().Clinical.geteDischargeDisableTabs()) enableDisableTabs(TAB_READY); else enableDisableTabs(NONE); form.lyrDetails().tabPageSummary().ccSummary().setReadOnly(); form.lyrDetails().tabPageDiagnosis().ccDiagnosis().setReadOnly(); form.lyrDetails().tabPageClinicalInfo().cc1().setReadOnly(); form.lyrDetails().tabPageOpsProcs().ccOpsProcs().setReadOnly(); form.lyrDetails().tabPageSPecialCBU().ccSpecialCBUD().setReadOnly(); form.lyrDetails().tabPagePlasticSurgery().ccPlasticSBCD().setReadOnly(); form.lyrDetails().tabPageFuturePlan().ccFuturePlan().setReadOnly(); form.lyrDetails().tabPageMedsSThk().ccTTA().setReadOnly(); form.lyrDetails().tabPageMedication().ccMedicationAdmission().setReadOnly(); form.lyrDetails().tabPagePharmacyApproval().ccPharmacyApproval().setReadOnly(); form.lyrDetails().tabPagePreview().ccPreview().setReadOnly(); form.lyrDetails().tabPageReady().ccReady().setReadOnly(); */ }
@Override protected void onCcSpecialCBUDValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPageNeonatal().ccSpecialCBUD().getLastEvent() != null) { if(form.lyrDetails().tabPageNeonatal().ccSpecialCBUD().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageNeonatal().ccSpecialCBUD().clearLastEvent(); } updateControlState(TAB_NEONATAL); }
@Override protected void onCcTTAValueChanged() throws PresentationLogicException { if (EDischargeLastEvent.EDISCHARGE_SAVE.equals(form.lyrDetails().tabPageTTA().ccTTA().getLastEvent())) { form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageTTA().ccTTA().clearLastEvent(); } updateControlState(TAB_TTA); }
@Override protected void onCcClinicalInfValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPageClinicalInfo().ccClinicalInf().getLastEvent() != null) { if(form.lyrDetails().tabPageClinicalInfo().ccClinicalInf().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageClinicalInfo().ccClinicalInf().clearLastEvent(); } updateControlState(TAB_CLINICAL); }
@Override protected void onCcMedicationValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPageMedication().ccMedication().getLastEvent() != null) { if(form.lyrDetails().tabPageMedication().ccMedication().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageMedication().ccMedication().clearLastEvent(); } updateControlState(TAB_MED); }
@Override protected void onCcPlasticSBCDValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPagePlasticSurgery().ccPlasticSBCD().getLastEvent() != null) { if(form.lyrDetails().tabPagePlasticSurgery().ccPlasticSBCD().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPagePlasticSurgery().ccPlasticSBCD().clearLastEvent(); } updateControlState(TAB_PLASTICS); }
@Override protected void onCcFuturePlanValueChanged() throws PresentationLogicException { if(form.lyrDetails().tabPageFuturePlan().ccFuturePlan().getLastEvent() != null) { if(form.lyrDetails().tabPageFuturePlan().ccFuturePlan().getLastEvent().equals(EDischargeLastEvent.EDISCHARGE_SAVE)) form.getLocalContext().setSelectedSummaryInstance(domain.getSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.lyrDetails().tabPageFuturePlan().ccFuturePlan().clearLastEvent(); } updateControlState(TAB_FUTURE); }
private boolean save() { NeonatalVo voNeonatal = form.getLocalContext().getSelectedInstance(); ArrayList<String> screenErrors = new ArrayList<String>(); if (form.ccDischargingNurse().getValue() == null) screenErrors.add("Discharging Midwife/Nurse is a mandatory item."); if (form.GroupVitaminK().getValue().equals(GroupVitaminKEnumeration.rdoVitaminKGivenYes) && form.cmbHowAdministered().getValue() == null) screenErrors.add("Route for Vitamin K is a mandatory item."); String[] arrErrors = voNeonatal.validate(); String[] arrScreenAndVoErrors = addScreenErrorsToVOErrors(screenErrors, arrErrors); if(arrScreenAndVoErrors != null) { engine.showErrors(arrScreenAndVoErrors); return false; } try { domain.saveNeonatal(voNeonatal, form.getLocalContext().getSTHKSummary()); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); setMode(FormMode.VIEW); open(); form.fireCustomControlValueChanged(); return false; } form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); form.fireCustomControlValueChanged(); return true; }
public boolean save() throws PresentationLogicException { PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns = populateDataFromScreen(); String[] str = voPlasticSurgeryAndBurns.validate(); if (str != null && str.length > 0) { engine.showErrors(str); return false; } try { voPlasticSurgeryAndBurns = domain.savePlasticSurgeryAndBurnsVo(voPlasticSurgeryAndBurns, form.getLocalContext().getSTHKSummary()); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.setMode(FormMode.VIEW); open(); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); form.fireCustomControlValueChanged(); // Temporary fix for WDEV-8612 (this code really belongs in the open() function) form.getGlobalContext().Clinical.seteDischargeDisableTabs(false); return false; } form.setMode(FormMode.VIEW); form.getLocalContext().setSelectedRecord(voPlasticSurgeryAndBurns); form.getGlobalContext().Clinical.seteDischargeDisableTabs(false); form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE); form.fireCustomControlValueChanged(); return true; }