private void populateScreenFromData(PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns) { clearInstanceControls(); if (voPlasticSurgeryAndBurns == null) return; form.cmbAnaesthetic().setValue(voPlasticSurgeryAndBurns.getAnaestheticType()); if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.YES)) form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageYes); else if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.NO)) form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageNo); form.dteFirstdressing().setValue(voPlasticSurgeryAndBurns.getScheduledFirstDressingDate()); form.dteSutureremoval().setValue(voPlasticSurgeryAndBurns.getScheduledSutureRemoval()); form.qmbSurgeon().newRow(voPlasticSurgeryAndBurns.getSurgeon(), voPlasticSurgeryAndBurns.getSurgeon().getIMosName()); form.qmbSurgeon().setValue(voPlasticSurgeryAndBurns.getSurgeon()); form.chkComplete().setValue(voPlasticSurgeryAndBurns.getIsComplete()); }
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; }
public void open() { PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns = domain.getPlasticSurgeryAndBurnsVo(form.getGlobalContext().Core.getCurrentCareContext()); form.getLocalContext().setSelectedRecord(voPlasticSurgeryAndBurns); populateScreenFromData(voPlasticSurgeryAndBurns); manageReadOnly(); }
public PlasticSurgeryAndBurnsVo getValue() { return form.getLocalContext().getSelectedRecord(); }
public void setValue(PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns) { form.getLocalContext().setSelectedRecord(voPlasticSurgeryAndBurns); }