Java 类ims.ocrr.vo.PACSLaunchAuditVo 实例源码

项目:AvoinApotti    文件:Logic.java   
@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());
    }
}
项目:openMAXIMS    文件:Logic.java   
@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());
    }
}
项目:openmaxims-linux    文件:Logic.java   
@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());
    }
}