Java 类ims.core.vo.enums.DocumentViewLevel 实例源码

项目:AvoinApotti    文件:Logic.java   
private void listDocumentsAtReferralLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        CatsReferralRefVo   referral            = form.getGlobalContext().RefMan.getCatsReferral();         
                            isGPLetterSelected  = false;
                            isGPLetterCategory  = false;                            

        form.getLocalContext().setDocumentCategory(category);
        form.getLocalContext().setCatsReferralRef(referral);

        initializeDynamicGrid();        
        populateGrid(viewLevel);            
    }
    else 
    {
        throw new RuntimeException();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtReferralLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        CatsReferralRefVo   referral            = form.getGlobalContext().RefMan.getCatsReferral();         
                            isGPLetterSelected  = false;
                            isGPLetterCategory  = false;                            

        form.getLocalContext().setDocumentCategory(category);
        form.getLocalContext().setCatsReferralRef(referral);

        initializeDynamicGrid();        
        populateGrid(viewLevel);            
    }
    else 
    {
        throw new RuntimeException();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtReferralLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        CatsReferralRefVo   referral            = form.getGlobalContext().RefMan.getCatsReferral();         
                            isGPLetterSelected  = false;
                            isGPLetterCategory  = false;                            

        form.getLocalContext().setDocumentCategory(category);
        form.getLocalContext().setCatsReferralRef(referral);

        initializeDynamicGrid();        
        populateGrid(viewLevel);            
    }
    else 
    {
        throw new RuntimeException();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void listDocumentsAtReferralLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        CatsReferralRefVo   referral            = form.getGlobalContext().CareUk.getCatsReferral();         
                            isGPLetterSelected  = false;
                            isGPLetterCategory  = false;                            

        form.getLocalContext().setDocumentCategory(category);
        form.getLocalContext().setCatsReferralRef(referral);

        initializeDynamicGrid();        
        populateGrid(viewLevel);            
    }
    else 
    {
        throw new RuntimeException();
    }
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(DocumentCategory category, UploadDocumentStoreLevel documentStoreLevel,DocumentViewLevel documentViewLevel) 
{
    form.getLocalContext().setDocumentCategory(category);
    form.getLocalContext().setUploadDocumentStoreLevel(documentStoreLevel);
    form.getLocalContext().setDocumentViewLevel(documentViewLevel);

    open();
    updateControlsStates();
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    if (!form.getLocalContext().getDocumentViewLevelIsNotNull())
        return;

    if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.CARECONTEXT)) 
    {               
        if (form.getGlobalContext().Core.getCurrentCareContext() == null) {
            throw new DomainRuntimeException("CareContext is mandatory!");
        }                   
        listDocumentsAtCareContextLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.REFERRAL)) 
    {   
        if (form.getGlobalContext().RefMan.getCatsReferral() == null) {
            throw new DomainRuntimeException("CatsReferral is mandatory!");
        }
        listDocumentsAtReferralLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());  
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.PATIENT)) 
    {               
        if (form.getGlobalContext().Core.getPatientShort() == null) {
            throw new DomainRuntimeException("Patient is mandatory!");
        }                   
        listDocumentsAtPatientLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void listDocumentsAtPatientLevel(DocumentCategory category,DocumentViewLevel viewLevel) 
{       
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listDocumentsAtCareContextLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull() &&
            form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateGrid(DocumentViewLevel level)
{
    form.dyngrd().getRows().clear();
    PatientDocumentVoCollection coll = null;
    TreeMap<String, Integer> map = new TreeMap<String, Integer>();

    coll = domain.listPatientDocuments(form.getGlobalContext().Core.getPatientShort(), form.getGlobalContext().Core.getCurrentCareContext(), form.getLocalContext().getDocumentCategory(), form.getLocalContext().getCatsReferralRef(), level);

    if (coll!= null &&
            coll.size() > 0)
    {
        countForRecords(coll, map);
        DynamicGridRow dynRow = null;   
        for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext();) 
        {
            String element = (String) iter.next();              
            dynRow = addParentRow(map, element);        

            for(int i = 0; i < coll.size(); i++)
            {
                if (coll.get(i).getCategory().getIItemText().equals(element))
                {
                    addRowRecord(coll, dynRow, i);
                    if (level.equals(DocumentViewLevel.REFERRAL) && isGPLetterCategory && !isGPLetterSelected )
                    {
                        dynRow.setExpanded(true);
                        //form.dyngrd().setValue(coll.get(i));                  
                        //onDyngrdRowSelectionChanged(form.dyngrd().getSelectedRow());      
                        isGPLetterSelected = true;
                    }
                }
            }               
        }               
    }   

    setSelectedInstance();//WDEV-13695
}
项目:AvoinApotti    文件:Logic.java   
private DocumentViewLevel getDocumentViewLevel()
{
    String value = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();
    if (value == null)
        return null;
    if (value.equals(DocumentViewLevel.CARECONTEXT.getText()))
        return DocumentViewLevel.CARECONTEXT;
    if (value.equals(DocumentViewLevel.PATIENT.getText()))
        return DocumentViewLevel.PATIENT;
    if (value.equals(DocumentViewLevel.REFERRAL.getText()))
        return DocumentViewLevel.REFERRAL;
    return null;
}
项目:AvoinApotti    文件:AccessLogic.java   
public boolean isAccessible()
{
    if(!super.isAccessible())
        return false;

    String documentViewLevel = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();       
    if (documentViewLevel == null)
        return false;

    if (documentViewLevel.equals(DocumentViewLevel.CARECONTEXT.getText()))
    {
        if (form.getGlobalContext().Core.getCurrentCareContext() == null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.REFERRAL.getText()))
    {
        if (form.getGlobalContext().RefMan.getCatsReferral()== null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.PATIENT.getText()))
    {
        if (form.getGlobalContext().Core.getPatientShort()== null)
            return false;
    }
    return true;

}
项目:AvoinApotti    文件:Logic.java   
private void initialze()
{
    form.lyr1().tabPagePresentationComp().ccPresentationComp().initialize();
    form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
    form.getGlobalContext().setPresentationReferalSummaryChanged(false);
    form.getLocalContext().setPresentationReferralSummaryvo(null);

}
项目:AvoinApotti    文件:Logic.java   
protected void onlyr1TabChanged(LayerBridge tab)
{

    if (tab.equals(form.lyr1().tabPagePresentationComp()))
    {

        if(form.getLocalContext().getPresentationReferralSummaryvoIsNotNull())
        {

            populatePresentationTab(form.getLocalContext().getPresentationReferralSummaryvo());

        }
        else
        {

            PresentationReferralSummaryVo refSummary  = domain.getPresentationReferralSummary(form.getGlobalContext().RefMan.getCatsReferral());
            form.getLocalContext().setPresentationReferralSummaryvo(refSummary);
            populatePresentationTab(refSummary);

        }   

    }
    else if (tab.equals(form.lyr1().tabPageLetter()))
    {
        try
        {

            form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242

        }
        catch (RuntimeException e)
        {
            engine.showMessage(e.toString());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void tabUploadChange()
{
    try 
    {           
        form.lyrPage().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
        //form.getGlobalContext().RefMan.setCatsReferralWizard(form.getLocalContext().getRecord());
        //ADDED FOR WDEV-7474 GlobalContext CatsRefferralWizard could be saved by upload document and you
        //must be sure that the CatsRefferalWizard has the latest version
        //form.getGlobalContext().RefMan.setCatsReferralWizard(domain.getCatsReferral(form.getLocalContext().getRecord()));
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.toString());               
    }
}
项目:openMAXIMS    文件:Logic.java   
public void initialize(DocumentCategory category, UploadDocumentStoreLevel documentStoreLevel,DocumentViewLevel documentViewLevel) 
{
    form.getLocalContext().setDocumentCategory(category);
    form.getLocalContext().setUploadDocumentStoreLevel(documentStoreLevel);
    form.getLocalContext().setDocumentViewLevel(documentViewLevel);

    open();
    updateControlsStates();
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    if (!form.getLocalContext().getDocumentViewLevelIsNotNull())
        return;

    if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.CARECONTEXT)) 
    {               
        if (form.getGlobalContext().Core.getCurrentCareContext() == null) {
            throw new DomainRuntimeException("CareContext is mandatory!");
        }                   
        listDocumentsAtCareContextLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.REFERRAL)) 
    {   
        if (form.getGlobalContext().RefMan.getCatsReferral() == null) {
            throw new DomainRuntimeException("CatsReferral is mandatory!");
        }
        listDocumentsAtReferralLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());  
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.PATIENT)) 
    {               
        if (form.getGlobalContext().Core.getPatientShort() == null) {
            throw new DomainRuntimeException("Patient is mandatory!");
        }                   
        listDocumentsAtPatientLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }
    //WDEV-18856
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.CLINICALREFERRAL)) 
    {   
        //WDEV-18948
        form.getGlobalContext().RefMan.setUploadDocumentsDialogDocumentType(DocumentCategory.INTERNAL_REFERRALS);

        if (form.getGlobalContext().Core.getPatientShort() == null) {
            throw new DomainRuntimeException("Patient is mandatory!");
        }                   
        listDocumentsAtPatientLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }

}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtPatientLevel(DocumentCategory category,DocumentViewLevel viewLevel) 
{       
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtCareContextLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull() &&
            form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openMAXIMS    文件:Logic.java   
private DocumentViewLevel getDocumentViewLevel()
{
    String value = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();
    if (value == null)
        return null;
    if (value.equals(DocumentViewLevel.CARECONTEXT.getText()))
        return DocumentViewLevel.CARECONTEXT;
    if (value.equals(DocumentViewLevel.PATIENT.getText()))
        return DocumentViewLevel.PATIENT;
    if (value.equals(DocumentViewLevel.REFERRAL.getText()))
        return DocumentViewLevel.REFERRAL;
    return null;
}
项目:openMAXIMS    文件:AccessLogic.java   
public boolean isAccessible()
{
    if(!super.isAccessible())
        return false;

    String documentViewLevel = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();       
    if (documentViewLevel == null)
        return false;

    if (documentViewLevel.equals(DocumentViewLevel.CARECONTEXT.getText()))
    {
        if (form.getGlobalContext().Core.getCurrentCareContext() == null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.REFERRAL.getText()))
    {
        if (form.getGlobalContext().RefMan.getCatsReferral()== null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.PATIENT.getText()))
    {
        if (form.getGlobalContext().Core.getPatientShort()== null)
            return false;
    }
    return true;

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnViewReferralDocumentsClick() throws PresentationLogicException
{
    if (form.lyrTriage().tabPageTriage().isVisible())
    {
        form.lyrTriage().tabPageTriage().htmDocument().setHTML("");
    }

    form.getGlobalContext().Core.setPatientShort(domain.getPatient(form.getLocalContext().getCurrentCatsReferral().getPatient()));
    engine.open(form.getForms().Core.ViewDocuments,new Object[]{FormMode.EDIT, null,UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL } );
}
项目:openMAXIMS    文件:Logic.java   
private void initialze()
{
    form.lyr1().tabPagePresentationComp().ccPresentationComp().initialize();
    form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
    form.getGlobalContext().setPresentationReferalSummaryChanged(false);
    form.getLocalContext().setPresentationReferralSummaryvo(null);

}
项目:openMAXIMS    文件:Logic.java   
protected void onlyr1TabChanged(LayerBridge tab)
{

    if (tab.equals(form.lyr1().tabPagePresentationComp()))
    {

        if(form.getLocalContext().getPresentationReferralSummaryvoIsNotNull())
        {

            populatePresentationTab(form.getLocalContext().getPresentationReferralSummaryvo());

        }
        else
        {

            PresentationReferralSummaryVo refSummary  = domain.getPresentationReferralSummary(form.getGlobalContext().RefMan.getCatsReferral());
            form.getLocalContext().setPresentationReferralSummaryvo(refSummary);
            populatePresentationTab(refSummary);

        }   

    }
    else if (tab.equals(form.lyr1().tabPageLetter()))
    {
        try
        {

            form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242

        }
        catch (RuntimeException e)
        {
            engine.showMessage(e.toString());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void tabUploadChange()
{
    try 
    {           
        form.lyrPage().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
        //form.getGlobalContext().RefMan.setCatsReferralWizard(form.getLocalContext().getRecord());
        //ADDED FOR WDEV-7474 GlobalContext CatsRefferralWizard could be saved by upload document and you
        //must be sure that the CatsRefferalWizard has the latest version
        //form.getGlobalContext().RefMan.setCatsReferralWizard(domain.getCatsReferral(form.getLocalContext().getRecord()));
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.toString());               
    }
}
项目:openMAXIMS    文件:Logic.java   
private void initialise(FormMode formMode)
{
    form.getLocalContext().setSelectedDocument(null);
    form.ccDocuments().initialize(null, UploadDocumentStoreLevel.PATIENT, DocumentViewLevel.CLINICALREFERRAL);
    form.ccDocuments().setMode(formMode);

}
项目:openMAXIMS    文件:Logic.java   
public void initialize(DocumentCategory category, UploadDocumentStoreLevel documentStoreLevel,DocumentViewLevel documentViewLevel) 
{
    form.getLocalContext().setDocumentCategory(category);
    form.getLocalContext().setUploadDocumentStoreLevel(documentStoreLevel);
    form.getLocalContext().setDocumentViewLevel(documentViewLevel);

    open();
    updateControlsStates();
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    if (!form.getLocalContext().getDocumentViewLevelIsNotNull())
        return;

    if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.CARECONTEXT)) 
    {               
        if (form.getGlobalContext().Core.getCurrentCareContext() == null) {
            throw new DomainRuntimeException("CareContext is mandatory!");
        }                   
        listDocumentsAtCareContextLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.REFERRAL)) 
    {   
        if (form.getGlobalContext().RefMan.getCatsReferral() == null) {
            throw new DomainRuntimeException("CatsReferral is mandatory!");
        }
        listDocumentsAtReferralLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());  
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.PATIENT)) 
    {               
        if (form.getGlobalContext().Core.getPatientShort() == null) {
            throw new DomainRuntimeException("Patient is mandatory!");
        }                   
        listDocumentsAtPatientLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }

}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtPatientLevel(DocumentCategory category,DocumentViewLevel viewLevel) 
{       
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listDocumentsAtCareContextLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull() &&
            form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(DocumentViewLevel level)
{
    form.dyngrd().getRows().clear();
    PatientDocumentVoCollection coll = null;
    TreeMap<String, Integer> map = new TreeMap<String, Integer>();

    coll = domain.listPatientDocuments(form.getGlobalContext().Core.getPatientShort(), form.getGlobalContext().Core.getCurrentCareContext(), form.getLocalContext().getDocumentCategory(), form.getLocalContext().getCatsReferralRef(), level);

    if (coll!= null &&
            coll.size() > 0)
    {
        countForRecords(coll, map);
        DynamicGridRow dynRow = null;   
        for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext();) 
        {
            String element = (String) iter.next();              
            dynRow = addParentRow(map, element);        

            for(int i = 0; i < coll.size(); i++)
            {
                if (coll.get(i).getCategory().getIItemText().equals(element))
                {
                    addRowRecord(coll, dynRow, i);
                    if (level.equals(DocumentViewLevel.REFERRAL) && isGPLetterCategory && !isGPLetterSelected )
                    {
                        dynRow.setExpanded(true);
                        //form.dyngrd().setValue(coll.get(i));                  
                        //onDyngrdRowSelectionChanged(form.dyngrd().getSelectedRow());      
                        isGPLetterSelected = true;
                    }
                }
            }               
        }               
    }   

    setSelectedInstance();//WDEV-13695
}
项目:openMAXIMS    文件:Logic.java   
private DocumentViewLevel getDocumentViewLevel()
{
    String value = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();
    if (value == null)
        return null;
    if (value.equals(DocumentViewLevel.CARECONTEXT.getText()))
        return DocumentViewLevel.CARECONTEXT;
    if (value.equals(DocumentViewLevel.PATIENT.getText()))
        return DocumentViewLevel.PATIENT;
    if (value.equals(DocumentViewLevel.REFERRAL.getText()))
        return DocumentViewLevel.REFERRAL;
    return null;
}
项目:openMAXIMS    文件:AccessLogic.java   
public boolean isAccessible()
{
    if(!super.isAccessible())
        return false;

    String documentViewLevel = ConfigFlag.GEN.DOCUMENT_VIEW_LEVEL.getValue();       
    if (documentViewLevel == null)
        return false;

    if (documentViewLevel.equals(DocumentViewLevel.CARECONTEXT.getText()))
    {
        if (form.getGlobalContext().Core.getCurrentCareContext() == null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.REFERRAL.getText()))
    {
        if (form.getGlobalContext().RefMan.getCatsReferral()== null)
            return false;
    }
    else if (documentViewLevel.equals(DocumentViewLevel.PATIENT.getText()))
    {
        if (form.getGlobalContext().Core.getPatientShort()== null)
            return false;
    }
    return true;

}
项目:openMAXIMS    文件:Logic.java   
private void initialze()
{
    form.lyr1().tabPagePresentationComp().ccPresentationComp().initialize();
    form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
    form.getGlobalContext().setPresentationReferalSummaryChanged(false);
    form.getLocalContext().setPresentationReferralSummaryvo(null);

}
项目:openMAXIMS    文件:Logic.java   
protected void onlyr1TabChanged(LayerBridge tab)
{

    if (tab.equals(form.lyr1().tabPagePresentationComp()))
    {

        if(form.getLocalContext().getPresentationReferralSummaryvoIsNotNull())
        {

            populatePresentationTab(form.getLocalContext().getPresentationReferralSummaryvo());

        }
        else
        {

            PresentationReferralSummaryVo refSummary  = domain.getPresentationReferralSummary(form.getGlobalContext().RefMan.getCatsReferral());
            form.getLocalContext().setPresentationReferralSummaryvo(refSummary);
            populatePresentationTab(refSummary);

        }   

    }
    else if (tab.equals(form.lyr1().tabPageLetter()))
    {
        try
        {

            form.lyr1().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);//WDEV-12242

        }
        catch (RuntimeException e)
        {
            engine.showMessage(e.toString());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void tabUploadChange()
{
    try 
    {           
        form.lyrPage().tabPageLetter().ccUploadDoc().initialize(DocumentCategory.GPLETTER, UploadDocumentStoreLevel.REFERRAL,DocumentViewLevel.REFERRAL);
        //form.getGlobalContext().RefMan.setCatsReferralWizard(form.getLocalContext().getRecord());
        //ADDED FOR WDEV-7474 GlobalContext CatsRefferralWizard could be saved by upload document and you
        //must be sure that the CatsRefferalWizard has the latest version
        //form.getGlobalContext().RefMan.setCatsReferralWizard(domain.getCatsReferral(form.getLocalContext().getRecord()));
    }
    catch (RuntimeException e)
    {
        engine.showMessage(e.toString());               
    }
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize(DocumentCategory category, UploadDocumentStoreLevel documentStoreLevel,DocumentViewLevel documentViewLevel) 
{
    form.getLocalContext().setDocumentCategory(category);
    form.getLocalContext().setUploadDocumentStoreLevel(documentStoreLevel);
    form.getLocalContext().setDocumentViewLevel(documentViewLevel);

    open();
    updateControlsStates();
}
项目:openmaxims-linux    文件:Logic.java   
private void open()
{
    if (!form.getLocalContext().getDocumentViewLevelIsNotNull())
        return;

    if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.CARECONTEXT)) 
    {               
        if (form.getGlobalContext().Core.getCurrentCareContext() == null) {
            throw new DomainRuntimeException("CareContext is mandatory!");
        }                   
        listDocumentsAtCareContextLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.REFERRAL)) 
    {   
        if (form.getGlobalContext().CareUk.getCatsReferral() == null) {
            throw new DomainRuntimeException("CatsReferral is mandatory!");
        }
        listDocumentsAtReferralLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());  
    }
    else if (form.getLocalContext().getDocumentViewLevel().equals(DocumentViewLevel.PATIENT)) 
    {               
        if (form.getGlobalContext().Core.getPatientShort() == null) {
            throw new DomainRuntimeException("Patient is mandatory!");
        }                   
        listDocumentsAtPatientLevel(form.getLocalContext().getDocumentCategory(), form.getLocalContext().getDocumentViewLevel());
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void listDocumentsAtPatientLevel(DocumentCategory category,DocumentViewLevel viewLevel) 
{       
    if (form.getGlobalContext().Core.getPatientShortIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void listDocumentsAtCareContextLevel(DocumentCategory category, DocumentViewLevel viewLevel) 
{
    if (form.getGlobalContext().Core.getPatientShortIsNotNull() &&
            form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) 
    {
        form.getLocalContext().setDocumentCategory(category);   

        initializeDynamicGrid();        
        populateGrid(viewLevel);
    }
    else 
    {
        throw new RuntimeException("No Patient selected");
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrid(DocumentViewLevel level)
{
    form.dyngrd().getRows().clear();
    PatientDocumentVoCollection coll = null;
    TreeMap<String, Integer> map = new TreeMap<String, Integer>();

    coll = domain.listPatientDocuments(form.getGlobalContext().Core.getPatientShort(), form.getGlobalContext().Core.getCurrentCareContext(), form.getLocalContext().getDocumentCategory(), form.getLocalContext().getCatsReferralRef(), level);

    if (coll!= null &&
            coll.size() > 0)
    {
        countForRecords(coll, map);
        DynamicGridRow dynRow = null;   
        for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext();) 
        {
            String element = (String) iter.next();              
            dynRow = addParentRow(map, element);        

            for(int i = 0; i < coll.size(); i++)
            {
                if (coll.get(i).getCategory().getIItemText().equals(element))
                {
                    addRowRecord(coll, dynRow, i);
                    if (level.equals(DocumentViewLevel.REFERRAL) && isGPLetterCategory && !isGPLetterSelected )
                    {
                        dynRow.setExpanded(true);
                        //form.dyngrd().setValue(coll.get(i));                  
                        //onDyngrdRowSelectionChanged(form.dyngrd().getSelectedRow());      
                        isGPLetterSelected = true;
                    }
                }
            }               
        }               
    }   

    setSelectedInstance();//WDEV-13695
}