private void populateScreenFromData(PacsConfigurationVo tempVo) { if( tempVo == null ) return; form.txtServer().setValue(tempVo.getServerAddress()); form.txtUsername().setValue(tempVo.getUsername()); form.txtUsernameString().setValue(tempVo.getUserNameParam()); form.txtPassword().setValue(tempVo.getPassword()); form.txtPasswordString().setValue(tempVo.getPasswordParam()); form.txtAccession().setValue(tempVo.getAccessionParam()); form.txtTestAccessionNumber().setValue(tempVo.getAccessionTestValue()); form.cmbPACSClientType().setValue(tempVo.getPACSClientType()); //WDEV-19551 form.chkLoggedInUser().setValue(tempVo.getUseLoggedUserName()); form.cmbPrimaryIdenifier().setValue(tempVo.getPrimaryIdentifier()); form.cmbSecondaryIdentifier().setValue(tempVo.getSecondaryIdentifier()); form.txtPatientIdentifierParam().setValue(tempVo.getPatientIdentifierParam()); form.txtIdentifierParam().setValue(tempVo.getIssuerOfIdentifierParam()); form.txtSessionTimeParam().setValue(tempVo.getSessionTimeParam()); form.txtPrimaryIdentifierCode().setValue(tempVo.getPrimaryIdentifierCode()); form.txtSecondaryIdentifierCode().setValue(tempVo.getSecondaryIdentifierCode()); form.chkEncryptedToken().setValue(tempVo.getUseEncryptedToken()); form.txtEncryptedTokenParam().setValue(tempVo.getEncryptedTokenParam()); form.txtKey().setValue(tempVo.getAESKey()); }
private boolean save() { PacsConfigurationVo record = populateDataFromScreen(form.getLocalContext().getPACSConfigVo()); if (form.cmbPACSClientType().getValue() == null) { engine.showMessage("PACS Client Type is mandatory!"); return false; } String[] arrErrors = record.validate(); if (arrErrors != null) { engine.showErrors(arrErrors); return false; } try { form.getLocalContext().setPACSConfigVo(domain.savePACSConfigVo(record)); } catch (StaleObjectException e) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return true; } showURL(); return true; }
private void open() { clearScreen(); PacsConfigurationVo tempVo = domain.getPACSConfigVo(); form.getLocalContext().setPACSConfigVo(tempVo); populateScreenFromData(tempVo); showURL(); form.setMode(FormMode.VIEW); }
private void populateScreenFromData(PacsConfigurationVo tempVo) { if( tempVo == null ) return; form.txtServer().setValue(tempVo.getServerAddress()); form.txtUsername().setValue(tempVo.getUsername()); form.txtUsernameString().setValue(tempVo.getUserNameParam()); form.txtPassword().setValue(tempVo.getPassword()); form.txtPasswordString().setValue(tempVo.getPasswordParam()); form.txtAccession().setValue(tempVo.getAccessionParam()); form.txtTestAccessionNumber().setValue(tempVo.getAccessionTestValue()); form.cmbPACSClientType().setValue(tempVo.getPACSClientType()); }
private void showURL() { PacsConfigurationVo record = populateDataFromScreen(form.getLocalContext().getPACSConfigVo()); form.lblURL().setValue(record.getServerAddressIsNotNull() ? record.getURLWithTestAccessionNumber() : ""); }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { PacsConfigurationVo tempVo = domain.getPACSConfigVo(); if(tempVo == null) { engine.showMessage("No PACS Configuration found."); return; } StringBuffer sbURL = new StringBuffer(); sbURL.append(tempVo.getURLWithoutTestAccessionNumber()); if (form.getGlobalContext().OCRR.CentricityWebPACS.getAccessionNumberIsNotNull()) sbURL.append(form.getGlobalContext().OCRR.CentricityWebPACS.getAccessionNumber()); else { engine.showMessage("Accession Number is null."); return; } if (form.getGlobalContext().Core.getPatientShort() != null) { PACSLaunchAuditVo voPacs = new PACSLaunchAuditVo(); voPacs.setPatient(form.getGlobalContext().Core.getPatientShort()); voPacs.setAccessionNo(form.getGlobalContext().OCRR.CentricityWebPACS.getAccessionNumber()); voPacs.setLaunchDateTime(new DateTime()); if (engine.getLoggedInUser() != null && engine.getLoggedInUser().getMosId() != null ) voPacs.setLaunchingUser(new MemberOfStaffRefVo(engine.getLoggedInUser().getMosId(), 0)); voPacs.setPACSClientType(tempVo.getPACSClientType()); voPacs.validate(); String[] arrErrors = voPacs.validate(); if (arrErrors != null) { engine.showErrors(arrErrors); return; } try { domain.savePACSAuditRecord(voPacs); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return; } } if (tempVo.getPACSClientTypeIsNotNull()) { if (tempVo.getPACSClientType().equals(PACSClientType.CENTRICITY)) { form.htmView().setIFrameValue(sbURL.toString()); } else if (tempVo.getPACSClientType().equals(PACSClientType.CARESTREAM)) { StringBuffer html = new StringBuffer(); html.append("<OBJECT ID=\"ChromeFrame\" width=\"100%\" height =\"100%\" CODEBASE=\"http://www.google.com\""); html.append("CLASSID=\"CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A\">"); html.append("<PARAM NAME=\"src\" VALUE=\"" + sbURL.toString() +"\">"); html.append("</OBJECT>"); form.htmView().setHTML(html.toString(), true); } } else { form.htmView().setIFrameValue(sbURL.toString()); } }
public PacsConfigurationVo getPACSConfigVo() { PACSConfig impl = (PACSConfig) getDomainImpl(PACSConfigImpl.class); return impl.getPACSConfigVo(); }
private void showURL() { PacsConfigurationVo record = populateDataFromScreen(form.getLocalContext().getPACSConfigVo()); String userName = engine.getLoggedInUser().getUsername(); StringBuffer sbURL = new StringBuffer(); String accessionNumber=null; String identifierValue=null; String typeCode=null; if(record.getAccessionParamIsNotNull()) { accessionNumber=record.getAccessionTestValue(); } else { identifierValue=record.getAccessionTestValue(); typeCode=record.getPrimaryIdentifierCode(); } sbURL.append(record.getServerAddress()); if(record.getUseEncryptedTokenIsNotNull() &&record.getUseEncryptedToken().equals(true)) { sbURL.append(record.getEncryptedTokenParam()); try { sbURL.append(encrypt(record.buildParameterList(accessionNumber,userName,identifierValue,typeCode),record.getAESKey())); } catch (Exception e) { String message="Error encrypting patient details"+e.getMessage()!=null?e.getMessage():""; LOG.error(message, e); engine.showMessage(message); engine.createSystemLogEntry(SystemLogType.APPLICATION, SystemLogLevel.FATALERROR, message); } } else { sbURL.append("&"); sbURL.append(record.buildParameterList(accessionNumber,userName,identifierValue,typeCode)); } form.lblURL().setValue(record.getServerAddressIsNotNull() ? sbURL.toString() : ""); }