Java 类ims.core.vo.HcpLocationVo 实例源码

项目:AvoinApotti    文件:MOSQueryImpl.java   
private HcpCollection listMOSByPrimaryLocation(HcpCollection collHCPs, LocationLiteVo mosLocation) {

    HcpCollection collHCPsForLocation = new HcpCollection();
    MosAdmin impl = (MosAdmin)getDomainImpl(MosAdminImpl.class);
    for (int i = 0; i < collHCPs.size(); i++)
    {
        MemberOfStaffVo mos = impl.getMemberOfStaff(collHCPs.get(i).getMos());
        for (int j = 0; j < mos.getLocations().size(); j++)
        {
            HcpLocationVo hcpLocation = mos.getLocations().get(j);
            if(hcpLocation.getIsPrimaryIsNotNull() && hcpLocation.getIsPrimary()){

                if(mosLocation.getID_Location().equals(hcpLocation.getLocation().getID_Location()))
                    collHCPsForLocation.add(collHCPs.get(i));
            }
        }
    }

    return collHCPsForLocation;
}
项目:AvoinApotti    文件:Logic.java   
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
    if (selectedRow == null )
        return;     

    if (selectedRow.getValue() instanceof OrganisationVo)
        return;         

    clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows()); 

    if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
    {
        selectedRow.setTextColor(Color.Red);    
        selectedRow.setChecked(true);   
    }       
    form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkForValidEndDate(DynamicGridCell cell, DynamicGridRow row)
{
    DynamicGridCell end_dateCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_END_DATE));

    if (wasPreviousAccreditationACCREDITED(row.getValue())
            && getColByIdentifier(COL_ACCREDITATION_END_DATE) != null
            && end_dateCell != null && end_dateCell.getValue() == null)
    {
        engine.showMessage("An Accreditation End date is required for " + ((HcpLocationVo)row.getValue()).getLocation().getName() + ". Please enter one and save.", "Missing End Date", MessageButtons.OK, MessageIcon.ERROR);

        if (getColByIdentifier(COL_ACCREDITATION) != null)
        {
            cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null && cell.getType().equals(DynamicCellType.ENUMERATION))
            {
                cell.setValue(AccreditationLocationStatus.ACCREDITED);
                cell.setIdentifier(AccreditationLocationStatus.ACCREDITED);
                cell.setWidth(200);
                cell.setTooltip(createAccreditationHistoryTooltip(((HcpLocationVo)row.getValue()).getAccreditationHistory(), ((HcpLocationVo)row.getValue()).getCaseTypes()));
            }
        }
        return false; 
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.NTPFCaseTypeConfigDialog) 
        && result.equals(DialogResult.OK)
        //&& form.getGlobalContext().NTPF.getCaseTypesIsNotNull()
        //&& form.getGlobalContext().NTPF.getCaseTypes().size() > 0
        && form.dyngrdOrganisationLocation().getSelectedRow() != null)
    {
        DynamicGridCell cell = form.dyngrdOrganisationLocation().getSelectedRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
            cell.setIdentifier(form.getGlobalContext().NTPF.getCaseTypes());

            if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
            {
                ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(form.getGlobalContext().NTPF.getCaseTypes());
            }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void mergeSavedAccreditation(MemberOfStaffVo voCouldContainsUnsavedLocationAccreditationMos)
{
    MemberOfStaffVo voMos = form.getGlobalContext().Admin.getSelectedMos();

    for (int j = 0; voCouldContainsUnsavedLocationAccreditationMos.getLocationsIsNotNull() && j < voCouldContainsUnsavedLocationAccreditationMos.getLocations().size(); j++)
    {
        HcpLocationVo voLoc = voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j);

        Boolean bFound = false;
        for (int i = 0; voMos.getLocationsIsNotNull() && i < voMos.getLocations().size(); i++)
        {
            if (voLoc.equals(voMos.getLocations().get(i)))
                bFound = true;
        }

        if (!bFound)
        {
            if (form.getGlobalContext().Admin.getSelectedMos().getLocations() == null)
                form.getGlobalContext().Admin.getSelectedMos().setLocations(new HcpLocationVoCollection());

            form.getGlobalContext().Admin.getSelectedMos().getLocations().add(voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j));
        }
    }

}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private HcpCollection listMOSByPrimaryLocation(HcpCollection collHCPs, LocationLiteVo mosLocation) {

    HcpCollection collHCPsForLocation = new HcpCollection();
    MosAdmin impl = (MosAdmin)getDomainImpl(MosAdminImpl.class);
    for (int i = 0; i < collHCPs.size(); i++)
    {
        MemberOfStaffVo mos = impl.getMemberOfStaff(collHCPs.get(i).getMos());
        for (int j = 0; j < mos.getLocations().size(); j++)
        {
            HcpLocationVo hcpLocation = mos.getLocations().get(j);
            if(hcpLocation.getIsPrimaryIsNotNull() && hcpLocation.getIsPrimary()){

                if(mosLocation.getID_Location().equals(hcpLocation.getLocation().getID_Location()))
                    collHCPsForLocation.add(collHCPs.get(i));
            }
        }
    }

    return collHCPsForLocation;
}
项目:openMAXIMS    文件:Logic.java   
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
    if (selectedRow == null )
        return;     

    if (selectedRow.getValue() instanceof OrganisationVo)
        return;         

    clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows()); 

    if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
    {
        selectedRow.setTextColor(Color.Red);    
        selectedRow.setChecked(true);   
    }       
    form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdOrganisationLocationRowChecked(DynamicGridRow row)
{
    if (!row.isChecked())
    {
        if ( (row.getValue() instanceof LocSiteVo) || (row.getValue() instanceof HcpLocationVo) )
        {
            DynamicGridCell cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null)
                cell.setValue(null);

        }
    }
    //WDEV-20218
    checkedOrUncheckChildRow(row.getRows(), row.isChecked());

}
项目:openMAXIMS    文件:Logic.java   
private boolean checkForValidEndDate(DynamicGridCell cell, DynamicGridRow row)
{
    DynamicGridCell end_dateCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_END_DATE));

    if (wasPreviousAccreditationACCREDITED(row.getValue())
            && getColByIdentifier(COL_ACCREDITATION_END_DATE) != null
            && end_dateCell != null && end_dateCell.getValue() == null)
    {
        engine.showMessage("An Accreditation End date is required for " + ((HcpLocationVo)row.getValue()).getLocation().getName() + ". Please enter one and save.", "Missing End Date", MessageButtons.OK, MessageIcon.ERROR);

        if (getColByIdentifier(COL_ACCREDITATION) != null)
        {
            cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null && cell.getType().equals(DynamicCellType.ENUMERATION))
            {
                cell.setValue(AccreditationLocationStatus.ACCREDITED);
                cell.setIdentifier(AccreditationLocationStatus.ACCREDITED);
                cell.setWidth(200);
                cell.setTooltip(createAccreditationHistoryTooltip(((HcpLocationVo)row.getValue()).getAccreditationHistory(), ((HcpLocationVo)row.getValue()).getCaseTypes()));
            }
        }
        return false; 
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.NTPFCaseTypeConfigDialog) 
        && result.equals(DialogResult.OK)
        //&& form.getGlobalContext().NTPF.getCaseTypesIsNotNull()
        //&& form.getGlobalContext().NTPF.getCaseTypes().size() > 0
        && form.dyngrdOrganisationLocation().getSelectedRow() != null)
    {
        DynamicGridCell cell = form.dyngrdOrganisationLocation().getSelectedRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
            cell.setIdentifier(form.getGlobalContext().NTPF.getCaseTypes());

            if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
            {
                ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(form.getGlobalContext().NTPF.getCaseTypes());
            }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void mergeSavedAccreditation(MemberOfStaffVo voCouldContainsUnsavedLocationAccreditationMos)
{
    MemberOfStaffVo voMos = form.getGlobalContext().Admin.getSelectedMos();

    for (int j = 0; voCouldContainsUnsavedLocationAccreditationMos.getLocationsIsNotNull() && j < voCouldContainsUnsavedLocationAccreditationMos.getLocations().size(); j++)
    {
        HcpLocationVo voLoc = voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j);

        Boolean bFound = false;
        for (int i = 0; voMos.getLocationsIsNotNull() && i < voMos.getLocations().size(); i++)
        {
            if (voLoc.equals(voMos.getLocations().get(i)))
                bFound = true;
        }

        if (!bFound)
        {
            if (form.getGlobalContext().Admin.getSelectedMos().getLocations() == null)
                form.getGlobalContext().Admin.getSelectedMos().setLocations(new HcpLocationVoCollection());

            form.getGlobalContext().Admin.getSelectedMos().getLocations().add(voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j));
        }
    }

}
项目:openMAXIMS    文件:MOSQueryImpl.java   
private HcpCollection listMOSByPrimaryLocation(HcpCollection collHCPs, LocationLiteVo mosLocation) {

    HcpCollection collHCPsForLocation = new HcpCollection();
    MosAdmin impl = (MosAdmin)getDomainImpl(MosAdminImpl.class);
    for (int i = 0; i < collHCPs.size(); i++)
    {
        MemberOfStaffVo mos = impl.getMemberOfStaff(collHCPs.get(i).getMos());
        for (int j = 0; j < mos.getLocations().size(); j++)
        {
            HcpLocationVo hcpLocation = mos.getLocations().get(j);
            if(hcpLocation.getIsPrimaryIsNotNull() && hcpLocation.getIsPrimary()){

                if(mosLocation.getID_Location().equals(hcpLocation.getLocation().getID_Location()))
                    collHCPsForLocation.add(collHCPs.get(i));
            }
        }
    }

    return collHCPsForLocation;
}
项目:openMAXIMS    文件:Logic.java   
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
    if (selectedRow == null )
        return;     

    if (selectedRow.getValue() instanceof OrganisationVo)
        return;         

    clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows()); 

    if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
    {
        selectedRow.setTextColor(Color.Red);    
        selectedRow.setChecked(true);   
    }       
    form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkForValidEndDate(DynamicGridCell cell, DynamicGridRow row)
{
    DynamicGridCell end_dateCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_END_DATE));

    if (wasPreviousAccreditationACCREDITED(row.getValue())
            && getColByIdentifier(COL_ACCREDITATION_END_DATE) != null
            && end_dateCell != null && end_dateCell.getValue() == null)
    {
        engine.showMessage("An Accreditation End date is required for " + ((HcpLocationVo)row.getValue()).getLocation().getName() + ". Please enter one and save.", "Missing End Date", MessageButtons.OK, MessageIcon.ERROR);

        if (getColByIdentifier(COL_ACCREDITATION) != null)
        {
            cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null && cell.getType().equals(DynamicCellType.ENUMERATION))
            {
                cell.setValue(AccreditationLocationStatus.ACCREDITED);
                cell.setIdentifier(AccreditationLocationStatus.ACCREDITED);
                cell.setWidth(200);
                cell.setTooltip(createAccreditationHistoryTooltip(((HcpLocationVo)row.getValue()).getAccreditationHistory(), ((HcpLocationVo)row.getValue()).getCaseTypes()));
            }
        }
        return false; 
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.NTPFCaseTypeConfigDialog) 
        && result.equals(DialogResult.OK)
        //&& form.getGlobalContext().NTPF.getCaseTypesIsNotNull()
        //&& form.getGlobalContext().NTPF.getCaseTypes().size() > 0
        && form.dyngrdOrganisationLocation().getSelectedRow() != null)
    {
        DynamicGridCell cell = form.dyngrdOrganisationLocation().getSelectedRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
            cell.setIdentifier(form.getGlobalContext().NTPF.getCaseTypes());

            if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
            {
                ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(form.getGlobalContext().NTPF.getCaseTypes());
            }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void mergeSavedAccreditation(MemberOfStaffVo voCouldContainsUnsavedLocationAccreditationMos)
{
    MemberOfStaffVo voMos = form.getGlobalContext().Admin.getSelectedMos();

    for (int j = 0; voCouldContainsUnsavedLocationAccreditationMos.getLocationsIsNotNull() && j < voCouldContainsUnsavedLocationAccreditationMos.getLocations().size(); j++)
    {
        HcpLocationVo voLoc = voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j);

        Boolean bFound = false;
        for (int i = 0; voMos.getLocationsIsNotNull() && i < voMos.getLocations().size(); i++)
        {
            if (voLoc.equals(voMos.getLocations().get(i)))
                bFound = true;
        }

        if (!bFound)
        {
            if (form.getGlobalContext().Admin.getSelectedMos().getLocations() == null)
                form.getGlobalContext().Admin.getSelectedMos().setLocations(new HcpLocationVoCollection());

            form.getGlobalContext().Admin.getSelectedMos().getLocations().add(voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j));
        }
    }

}
项目:openmaxims-linux    文件:MOSQueryImpl.java   
private HcpCollection listMOSByPrimaryLocation(HcpCollection collHCPs, LocationLiteVo mosLocation) {

    HcpCollection collHCPsForLocation = new HcpCollection();
    MosAdmin impl = (MosAdmin)getDomainImpl(MosAdminImpl.class);
    for (int i = 0; i < collHCPs.size(); i++)
    {
        MemberOfStaffVo mos = impl.getMemberOfStaff(collHCPs.get(i).getMos());
        for (int j = 0; j < mos.getLocations().size(); j++)
        {
            HcpLocationVo hcpLocation = mos.getLocations().get(j);
            if(hcpLocation.getIsPrimaryIsNotNull() && hcpLocation.getIsPrimary()){

                if(mosLocation.getID_Location().equals(hcpLocation.getLocation().getID_Location()))
                    collHCPsForLocation.add(collHCPs.get(i));
            }
        }
    }

    return collHCPsForLocation;
}
项目:openmaxims-linux    文件:Logic.java   
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
    if (selectedRow == null )
        return;     

    if (selectedRow.getValue() instanceof OrganisationVo)
        return;         

    clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows()); 

    if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
    {
        selectedRow.setTextColor(Color.Red);    
        selectedRow.setChecked(true);   
    }       
    form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean checkForValidEndDate(DynamicGridCell cell, DynamicGridRow row)
{
    DynamicGridCell end_dateCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_END_DATE));

    if (wasPreviousAccreditationACCREDITED(row.getValue())
            && getColByIdentifier(COL_ACCREDITATION_END_DATE) != null
            && end_dateCell != null && end_dateCell.getValue() == null)
    {
        engine.showMessage("An Accreditation End date is required for " + ((HcpLocationVo)row.getValue()).getLocation().getName() + ". Please enter one and save.", "Missing End Date", MessageButtons.OK, MessageIcon.ERROR);

        if (getColByIdentifier(COL_ACCREDITATION) != null)
        {
            cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null && cell.getType().equals(DynamicCellType.ENUMERATION))
            {
                cell.setValue(AccreditationLocationStatus.ACCREDITED);
                cell.setIdentifier(AccreditationLocationStatus.ACCREDITED);
                cell.setWidth(200);
                cell.setTooltip(createAccreditationHistoryTooltip(((HcpLocationVo)row.getValue()).getAccreditationHistory(), ((HcpLocationVo)row.getValue()).getCaseTypes()));
            }
        }
        return false; 
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.NTPFCaseTypeConfigDialog) 
        && result.equals(DialogResult.OK)
        //&& form.getGlobalContext().NTPF.getCaseTypesIsNotNull()
        //&& form.getGlobalContext().NTPF.getCaseTypes().size() > 0
        && form.dyngrdOrganisationLocation().getSelectedRow() != null)
    {
        DynamicGridCell cell = form.dyngrdOrganisationLocation().getSelectedRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
            cell.setIdentifier(form.getGlobalContext().NTPF.getCaseTypes());

            if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
            {
                ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(form.getGlobalContext().NTPF.getCaseTypes());
            }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void mergeSavedAccreditation(MemberOfStaffVo voCouldContainsUnsavedLocationAccreditationMos)
{
    MemberOfStaffVo voMos = form.getGlobalContext().Admin.getSelectedMos();

    for (int j = 0; voCouldContainsUnsavedLocationAccreditationMos.getLocationsIsNotNull() && j < voCouldContainsUnsavedLocationAccreditationMos.getLocations().size(); j++)
    {
        HcpLocationVo voLoc = voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j);

        Boolean bFound = false;
        for (int i = 0; voMos.getLocationsIsNotNull() && i < voMos.getLocations().size(); i++)
        {
            if (voLoc.equals(voMos.getLocations().get(i)))
                bFound = true;
        }

        if (!bFound)
        {
            if (form.getGlobalContext().Admin.getSelectedMos().getLocations() == null)
                form.getGlobalContext().Admin.getSelectedMos().setLocations(new HcpLocationVoCollection());

            form.getGlobalContext().Admin.getSelectedMos().getLocations().add(voCouldContainsUnsavedLocationAccreditationMos.getLocations().get(j));
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdOrganisationLocationRowChecked(DynamicGridRow row)
{
    if (!row.isChecked())
    {
        if ( (row.getValue() instanceof LocSiteVo) || (row.getValue() instanceof HcpLocationVo) )
        {
            DynamicGridCell cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null)
                cell.setValue(null);

        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private Boolean wasPreviousAccreditationACCREDITED(Object value)
{

    if (value instanceof HcpLocationVo)
    {   
        if ( ((HcpLocationVo)value).getAccreditationStatusIsNotNull() 
            && ((HcpLocationVo)value).getAccreditationStatus().equals(AccreditationLocationStatus.ACCREDITED) )
            return true;
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
    form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());


    DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
    if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
        && ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
             && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
        return;

    if (form.dyngrdOrganisationLocation().getSelectedRow() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
        form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
    else if (cell.getIdentifier() != null 
        && cell.getIdentifier() instanceof CaseTypeCollection)
    {
        form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
    }
    else
    {
        form.getGlobalContext().NTPF.setCaseTypes(null);
    }

    engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
项目:AvoinApotti    文件:Logic.java   
private void populateMosDetailsForSelectedTreeNode()
{
    MemberOfStaffVo voMos = new MemberOfStaffVo();
    if (form.lyrLHS().tabOrganisation().isHeaderVisible())
    {
        if (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode() != null)
        {
            if ((form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocSiteVo) || (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocMostVo))
            {
                HcpLocationVo voHcpLocation = new HcpLocationVo();
                voHcpLocation.setLocation((LocMostVo) form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue());

                if (voMos.getLocationsIsNotNull())
                {
                    voMos.getLocations().add(voHcpLocation);
                }
                else
                {
                    HcpLocationVoCollection voCollLocations = new HcpLocationVoCollection();
                    voCollLocations.add(voHcpLocation);
                    voMos.setLocations(voCollLocations);
                }

                form.setMode(FormMode.EDIT);
                populateScreenFromMosVo(voMos);
                form.getGlobalContext().Admin.setSelectedMos(voMos);
                form.cmbType().setFocus();
            }
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private Boolean wasPreviousAccreditationACCREDITED(Object value)
{

    if (value instanceof HcpLocationVo)
    {   
        if ( ((HcpLocationVo)value).getAccreditationStatusIsNotNull() 
            && ((HcpLocationVo)value).getAccreditationStatus().equals(AccreditationLocationStatus.ACCREDITED) )
            return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
    form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());


    DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
    if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
        && ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
             && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
        return;

    if (form.dyngrdOrganisationLocation().getSelectedRow() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
        form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
    else if (cell.getIdentifier() != null 
        && cell.getIdentifier() instanceof CaseTypeCollection)
    {
        form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
    }
    else
    {
        form.getGlobalContext().NTPF.setCaseTypes(null);
    }

    engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
项目:openMAXIMS    文件:Logic.java   
private void populateMosDetailsForSelectedTreeNode()
{
    MemberOfStaffVo voMos = new MemberOfStaffVo();
    if (form.lyrLHS().tabOrganisation().isHeaderVisible())
    {
        if (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode() != null)
        {
            if ((form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocSiteVo) || (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocMostVo))
            {
                HcpLocationVo voHcpLocation = new HcpLocationVo();
                voHcpLocation.setLocation((LocMostVo) form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue());

                if (voMos.getLocationsIsNotNull())
                {
                    voMos.getLocations().add(voHcpLocation);
                }
                else
                {
                    HcpLocationVoCollection voCollLocations = new HcpLocationVoCollection();
                    voCollLocations.add(voHcpLocation);
                    voMos.setLocations(voCollLocations);
                }

                form.setMode(FormMode.EDIT);
                populateScreenFromMosVo(voMos);
                form.getGlobalContext().Admin.setSelectedMos(voMos);
                form.cmbType().setFocus();
            }
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdOrganisationLocationRowChecked(DynamicGridRow row)
{
    if (!row.isChecked())
    {
        if ( (row.getValue() instanceof LocSiteVo) || (row.getValue() instanceof HcpLocationVo) )
        {
            DynamicGridCell cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null)
                cell.setValue(null);

        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private Boolean wasPreviousAccreditationACCREDITED(Object value)
{

    if (value instanceof HcpLocationVo)
    {   
        if ( ((HcpLocationVo)value).getAccreditationStatusIsNotNull() 
            && ((HcpLocationVo)value).getAccreditationStatus().equals(AccreditationLocationStatus.ACCREDITED) )
            return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
    form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());


    DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
    if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
        && ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
             && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
        return;

    if (form.dyngrdOrganisationLocation().getSelectedRow() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
        form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
    else if (cell.getIdentifier() != null 
        && cell.getIdentifier() instanceof CaseTypeCollection)
    {
        form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
    }
    else
    {
        form.getGlobalContext().NTPF.setCaseTypes(null);
    }

    engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
项目:openMAXIMS    文件:Logic.java   
private void populateMosDetailsForSelectedTreeNode()
{
    MemberOfStaffVo voMos = new MemberOfStaffVo();
    if (form.lyrLHS().tabOrganisation().isHeaderVisible())
    {
        if (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode() != null)
        {
            if ((form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocSiteVo) || (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocMostVo))
            {
                HcpLocationVo voHcpLocation = new HcpLocationVo();
                voHcpLocation.setLocation((LocMostVo) form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue());

                if (voMos.getLocationsIsNotNull())
                {
                    voMos.getLocations().add(voHcpLocation);
                }
                else
                {
                    HcpLocationVoCollection voCollLocations = new HcpLocationVoCollection();
                    voCollLocations.add(voHcpLocation);
                    voMos.setLocations(voCollLocations);
                }

                form.setMode(FormMode.EDIT);
                populateScreenFromMosVo(voMos);
                form.getGlobalContext().Admin.setSelectedMos(voMos);
                form.cmbType().setFocus();
            }
        }

    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onDyngrdOrganisationLocationRowChecked(DynamicGridRow row)
{
    if (!row.isChecked())
    {
        if ( (row.getValue() instanceof LocSiteVo) || (row.getValue() instanceof HcpLocationVo) )
        {
            DynamicGridCell cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
            if (cell != null)
                cell.setValue(null);

        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private Boolean wasPreviousAccreditationACCREDITED(Object value)
{

    if (value instanceof HcpLocationVo)
    {   
        if ( ((HcpLocationVo)value).getAccreditationStatusIsNotNull() 
            && ((HcpLocationVo)value).getAccreditationStatus().equals(AccreditationLocationStatus.ACCREDITED) )
            return true;
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
    form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());


    DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
    if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
        && ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
             && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
        return;

    if (form.dyngrdOrganisationLocation().getSelectedRow() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
        && form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
        form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
    else if (cell.getIdentifier() != null 
        && cell.getIdentifier() instanceof CaseTypeCollection)
    {
        form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
    }
    else
    {
        form.getGlobalContext().NTPF.setCaseTypes(null);
    }

    engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateMosDetailsForSelectedTreeNode()
{
    MemberOfStaffVo voMos = new MemberOfStaffVo();
    if (form.lyrLHS().tabOrganisation().isHeaderVisible())
    {
        if (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode() != null)
        {
            if ((form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocSiteVo) || (form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue() instanceof LocMostVo))
            {
                HcpLocationVo voHcpLocation = new HcpLocationVo();
                voHcpLocation.setLocation((LocMostVo) form.lyrLHS().tabOrganisation().treOrganisation().getSelectedNode().getValue());

                if (voMos.getLocationsIsNotNull())
                {
                    voMos.getLocations().add(voHcpLocation);
                }
                else
                {
                    HcpLocationVoCollection voCollLocations = new HcpLocationVoCollection();
                    voCollLocations.add(voHcpLocation);
                    voMos.setLocations(voCollLocations);
                }

                form.setMode(FormMode.EDIT);
                populateScreenFromMosVo(voMos);
                form.getGlobalContext().Admin.setSelectedMos(voMos);
                form.cmbType().setFocus();
            }
        }

    }
}
项目:AvoinApotti    文件:LocationProvider.java   
public ILocation[] listConfiguredUserLocations(IAppUser user) 
{
    if (user == null)
        throw new RuntimeException("Invalid user");

    if (user.getMosId() == null)
        return new ILocation[0];

    DomainFactory factory = getDomainFactory();

    // Get the member of staff and the location from database
    MemberOfStaffVo memberOfStaff = MemberOfStaffVoAssembler.create((MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, user.getMosId()));

    // If the member of staff has no locations - return false
    if (memberOfStaff.getLocations() == null)
        return new ILocation[0];

    LocationLiteVoCollection locColl = new LocationLiteVoCollection();

    // Check for a location for the member of staff
    for (int i = 0; i < memberOfStaff.getLocations().size(); i++)
    {
        HcpLocationVo hcpLocation = memberOfStaff.getLocations().get(i);

        // Skip to next location if the HCP location is null or HCP location doesn't have a location 
        if (hcpLocation == null)
            continue;

        if (hcpLocation.getLocation() == null)
            continue;

        if (hcpLocation.getLocation().getIsActiveIsNotNull() && !hcpLocation.getLocation().getIsActive())
            continue;

        if(hcpLocation.getLocation().getIsVirtualIsNotNull() && hcpLocation.getLocation().getIsVirtual())
            continue;

        // The locations match - return true
        locColl.add(hcpLocation.getLocation());
    }

    return locColl.size() == 0 ? new ILocation[0] : locColl.sort(true).toILocationArray();
}
项目:AvoinApotti    文件:Logic.java   
protected void onDyngrdOrganisationLocationCellValueChanged(DynamicGridCell cell)
{
    if (cell.getType().equals(DynamicCellType.ENUMERATION))
    {
        DynamicGridRow row = cell.getRow();
        if ( (row != null) && (row.getValue() != null) )
        {
            form.dyngrdOrganisationLocation().setSelectedRow(row);

            if (cell.getValue() != null)
                row.setChecked(true);
            else
                row.setChecked(false);

            //Find the previous accreditation for this Row....if it was ACCREDITED stop and insist on an end date being saved first

            if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
            {
                if (getColByIdentifier(COL_ACCREDITATION) != null && getColByIdentifier(COL_ACCREDITATION_CASETYPES) != null)
                {
                    DynamicGridCell cellAccreditation = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));

                    if (cellAccreditation.getValue() != null && (((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED) || ((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)))
                    {
                        row.getCells().newCell(getColByIdentifier(COL_ACCREDITATION_CASETYPES), DynamicCellType.BUTTON);
                    }
                    else
                    {
                        DynamicGridCell caseTypeCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

                        if (caseTypeCell != null)
                            caseTypeCell.clear();
                    }

                    DynamicGridCell cellCases = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

                    if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
                    {
                        ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(null);
                    }
                    else
                    if (cellCases != null)
                        cellCases.setIdentifier(null);

                }
            }
        }
    }

}
项目:openMAXIMS    文件:LocationProvider.java   
public ILocation[] listConfiguredUserLocations(IAppUser user) 
{
    if (user == null)
        throw new RuntimeException("Invalid user");

    if (user.getMosId() == null)
        return new ILocation[0];

    DomainFactory factory = getDomainFactory();

    // Get the member of staff and the location from database
    MemberOfStaffVo memberOfStaff = MemberOfStaffVoAssembler.create((MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, user.getMosId()));

    // If the member of staff has no locations - return false
    if (memberOfStaff.getLocations() == null)
        return new ILocation[0];

    LocationLiteVoCollection locColl = new LocationLiteVoCollection();

    // Check for a location for the member of staff
    for (int i = 0; i < memberOfStaff.getLocations().size(); i++)
    {
        HcpLocationVo hcpLocation = memberOfStaff.getLocations().get(i);

        // Skip to next location if the HCP location is null or HCP location doesn't have a location 
        if (hcpLocation == null)
            continue;

        if (hcpLocation.getLocation() == null)
            continue;

        if (hcpLocation.getLocation().getIsActiveIsNotNull() && !hcpLocation.getLocation().getIsActive())
            continue;

        if(hcpLocation.getLocation().getIsVirtualIsNotNull() && hcpLocation.getLocation().getIsVirtual())
            continue;

        // The locations match - return true
        locColl.add(hcpLocation.getLocation());
    }

    return locColl.size() == 0 ? new ILocation[0] : locColl.sort(true).toILocationArray();
}
项目:openMAXIMS    文件:Logic.java   
protected void onDyngrdOrganisationLocationCellValueChanged(DynamicGridCell cell)
{
    if (cell.getType().equals(DynamicCellType.ENUMERATION))
    {
        DynamicGridRow row = cell.getRow();
        if ( (row != null) && (row.getValue() != null) )
        {
            form.dyngrdOrganisationLocation().setSelectedRow(row);

            if (cell.getValue() != null)
                row.setChecked(true);
            else
                row.setChecked(false);

            //Find the previous accreditation for this Row....if it was ACCREDITED stop and insist on an end date being saved first

            if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
            {
                if (getColByIdentifier(COL_ACCREDITATION) != null && getColByIdentifier(COL_ACCREDITATION_CASETYPES) != null)
                {
                    DynamicGridCell cellAccreditation = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));

                    if (cellAccreditation.getValue() != null && (((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED) || ((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)))
                    {
                        row.getCells().newCell(getColByIdentifier(COL_ACCREDITATION_CASETYPES), DynamicCellType.BUTTON);
                    }
                    else
                    {
                        DynamicGridCell caseTypeCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

                        if (caseTypeCell != null)
                            caseTypeCell.clear();
                    }

                    DynamicGridCell cellCases = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

                    if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
                    {
                        ((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(null);
                    }
                    else
                    if (cellCases != null)
                        cellCases.setIdentifier(null);

                }
            }
        }
    }

}