private void checkLoggedInUser() { if (domain.getHcpUser() == null) { if (returnContextType()) { form.lyrTabs().tabClinicalNotes().setHeaderVisible(true); form.lyrTabs().tabClinicalNotes().setHeaderEnabled(false); form.lyrTabs().tabOPDNote().setHeaderVisible(false); } else if (!returnContextType()) { form.lyrTabs().tabClinicalNotes().setHeaderVisible(false); form.lyrTabs().tabOPDNote().setHeaderVisible(true); form.lyrTabs().tabOPDNote().setHeaderEnabled(false); } NotingDetailsVo voNote = domain.getNotingDetailsForCareContext(form.getGlobalContext().Core.getCurrentCareContext()); //WDEV-19027 if (voNote != null) { if ((voNote.getIsDictatedIsNotNull() && voNote.getIsDictated().booleanValue()) || (voNote.getIsWrittenIsNotNull() && voNote.getIsWritten().booleanValue())) { if (returnContextType()) form.lyrTabs().tabClinicalNotes().setHeaderEnabled(true); else if (!returnContextType()) form.lyrTabs().tabOPDNote().setHeaderEnabled(true); } } } }
public NotingDetailsVo saveNotingDetails(NotingDetailsVo notingDetailVo) throws StaleObjectException { // Ensure the value object has been validated if (!notingDetailVo.isValidated()) throw new DomainRuntimeException("Noting Details has not been validated"); DomainFactory factory = getDomainFactory(); NotingDetails doNoting = NotingDetailsVoAssembler.extractNotingDetails(factory, notingDetailVo); CareContext doCarecontext = getCurrentCareContext(notingDetailVo.getCareContext());//WDEV-19027 doNoting.setCareContext(doCarecontext);//WDEV-19027 factory.save(doNoting); return NotingDetailsVoAssembler.create(doNoting); }
private void openNotingDetails() { clearNotingDetails(); form.setMode(FormMode.VIEW); if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) //WDEV-19027 { fillSummaryGrid(); NotingDetailsVo voNote = domain.getNotingDetailsForCareContext(form.getGlobalContext().Core.getCurrentCareContext());//WDEV-19027 if (voNote != null) { form.getLocalContext().setSelectedNotingDetailsVo(voNote); GenForm.lyrTabsLayer.tabDetailsContainer.grdNotingDetailsRow row = form.lyrTabs().tabDetails().grdNotingDetails().getRowByValue("Dictated"); if (row != null) row.setcolSelect(voNote.getIsDictatedIsNotNull() ? voNote.getIsDictated().booleanValue() : false); row = form.lyrTabs().tabDetails().grdNotingDetails().getRowByValue("Written"); if (row != null) row.setcolSelect(voNote.getIsWrittenIsNotNull() ? voNote.getIsWritten().booleanValue() : false); row = form.lyrTabs().tabDetails().grdNotingDetails().getRowByValue("Typed"); if (row != null) row.setcolSelect(voNote.getIsTypedIsNotNull() ? voNote.getIsTyped().booleanValue() : false); form.lyrTabs().tabDetails().btnUpdateNoting().setVisible(true); form.lyrTabs().tabDetails().btnUpdateNoting().setEnabled(true); form.lyrTabs().tabDetails().btnNewNoting().setVisible(true); form.lyrTabs().tabDetails().btnNewNoting().setEnabled(false); } else { form.lyrTabs().tabDetails().btnNewNoting().setVisible(true); form.lyrTabs().tabDetails().btnNewNoting().setEnabled(true); form.lyrTabs().tabDetails().btnUpdateNoting().setVisible(false); form.lyrTabs().tabDetails().btnUpdateNoting().setEnabled(false); } } else { form.lyrTabs().tabDetails().btnUpdateNoting().setVisible(true); form.lyrTabs().tabDetails().btnUpdateNoting().setEnabled(false); form.lyrTabs().tabDetails().btnNewNoting().setVisible(true); form.lyrTabs().tabDetails().btnNewNoting().setEnabled(false); } }