Java 类ims.admin.vo.AppImageVo 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    if (args != null)
    {
        if (args[0] != null && args[0] instanceof AppImageVo)
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
        }
        else
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
        }
    }

    initialise();
}
项目:AvoinApotti    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:AvoinApotti    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:AvoinApotti    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:AvoinApotti    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:AvoinApotti    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:AvoinApotti    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:AvoinApotti    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:AvoinApotti    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
    // Set a reference to selected image
    AppImageVo selectedImage = form.grdImages().getValue();

    // - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
    form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

    // Set image and text for 'Activate/Inactivate' option
    // - if the action is active then set the text to 'Deactivate' and appropriate image
    // - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
    if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
        form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
    }
    else
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
        form.getContextMenus().getImageAdminActivateItem().setText("Activate");
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdImages().getSelectedRow() == null)
    {
        engine.showErrors(new String[]{"Please select an image."});
        return;
    }
    Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
    AppImageVo image =  domain.getImageById(id);
    if (image == null)
    {
        engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
        return;
    }
    INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
    nav.setTextNode(form.txtName().getValue());
    nav.setImageNode(image);
    form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    if (args != null)
    {
        if (args[0] != null && args[0] instanceof AppImageVo)
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
        }
        else
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
        }
    }

    initialise();
}
项目:openmaxims-linux    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openmaxims-linux    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForPatientWhiteBoardVo tempVo) throws IOException
{
    if (tempVo == null || tempVo.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tempVo.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdImages().getSelectedRow() == null)
    {
        engine.showErrors(new String[]{"Please select an image."});
        return;
    }
    Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
    AppImageVo image =  domain.getImageById(id);
    if (image == null)
    {
        engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
        return;
    }
    INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
    nav.setTextNode(form.txtName().getValue());
    nav.setImageNode(image);
    form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
    // Set a reference to selected image
    AppImageVo selectedImage = form.grdImages().getValue();

    // - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
    form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

    // Set image and text for 'Activate/Inactivate' option
    // - if the action is active then set the text to 'Deactivate' and appropriate image
    // - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
    if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
        form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
    }
    else
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
        form.getContextMenus().getImageAdminActivateItem().setText("Activate");
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    if (args != null)
    {
        if (args[0] != null && args[0] instanceof AppImageVo)
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
        }
        else
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
        }
    }

    initialise();
}
项目:openmaxims-linux    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openMAXIMS    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
    // Set a reference to selected image
    AppImageVo selectedImage = form.grdImages().getValue();

    // - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
    form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

    // Set image and text for 'Activate/Inactivate' option
    // - if the action is active then set the text to 'Deactivate' and appropriate image
    // - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
    if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
        form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
    }
    else
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
        form.getContextMenus().getImageAdminActivateItem().setText("Activate");
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdImages().getSelectedRow() == null)
    {
        engine.showErrors(new String[]{"Please select an image."});
        return;
    }
    Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
    AppImageVo image =  domain.getImageById(id);
    if (image == null)
    {
        engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
        return;
    }
    INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
    nav.setTextNode(form.txtName().getValue());
    nav.setImageNode(image);
    form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
    engine.close(DialogResult.OK);
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
    // Set a reference to selected image
    AppImageVo selectedImage = form.grdImages().getValue();

    // - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
    form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

    // Set image and text for 'Activate/Inactivate' option
    // - if the action is active then set the text to 'Deactivate' and appropriate image
    // - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
    if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
        form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
    }
    else
    {
        form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
        form.getContextMenus().getImageAdminActivateItem().setText("Activate");
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    if (args != null)
    {
        if (args[0] != null && args[0] instanceof AppImageVo)
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
        }
        else
        {
            form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
        }
    }

    initialise();
}
项目:openmaxims-linux    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openmaxims-linux    文件:Logic.java   
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}
项目:openmaxims-linux    文件:Logic.java   
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
    if(patientImage == null)
        return;

    List<String> imagesColl = form.getLocalContext().getPatientImagesList();

    if (imagesColl == null)
        imagesColl = new ArrayList<String>();

    if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
    {
        imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
    }
    else
    {
        imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
    }

    form.getLocalContext().setPatientImagesList(imagesColl);
}
项目:openmaxims-linux    文件:Logic.java   
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
    if (tracking == null || tracking.getPatient() == null)
        return null;

    String sessionID = engine.getSessionId();

    AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();

    //Existing Patient with no image
    if (dbImageVo == null)
    {
        // NoPatientImage   
        AppImageVo imageVo = new AppImageVo();
        imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());

        return imageVo;
    }

    String encodedImage = dbImageVo.getImageData();
    String type = dbImageVo.getImageType().getText();                       

    return decodeFromBase64(encodedImage, sessionID, type);
}