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

项目:AvoinApotti    文件:Logic.java   
private TreeNode add(TreeNode parentNode, OrgLiteVo organization)
{
    if (organization == null || organization.getName() == null)
        return null;

    if (!hasAllowedLocations(organization, engine.getLoggedInUser()))
    {
        return null;
    }

    TreeNode node;

    if (parentNode == null)
        node = form.treeLocation().getNodes().add(organization, organization.getName());
    else
        node = parentNode.getNodes().add(organization, organization.getName());

    node.setExpandedImage(form.getImages().Admin.Organisation);
    node.setCollapsedImage(form.getImages().Admin.Organisation);
    addLoadingNode(node);
    node.setExpanded(false);
    return node;
}
项目:AvoinApotti    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private TreeNode add(TreeNode parentNode, OrgLiteVo organization)
{
    if (organization == null || organization.getName() == null)
        return null;

    if (!hasAllowedLocations(organization, engine.getLoggedInUser()))
    {
        return null;
    }

    TreeNode node;

    if (parentNode == null)
        node = form.treeLocation().getNodes().add(organization, organization.getName());
    else
        node = parentNode.getNodes().add(organization, organization.getName());

    node.setExpandedImage(form.getImages().Admin.Organisation);
    node.setCollapsedImage(form.getImages().Admin.Organisation);
    addLoadingNode(node);
    node.setExpanded(false);
    return node;
}
项目:openMAXIMS    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateLHO() throws FormOpenException  
{
    OrgLiteVoCollection orgColl = null;

    orgColl = domain.listLHOs();

    if(orgColl == null || (orgColl != null && orgColl.size() == 0))
        throw new FormOpenException("Please set up LHO before open form.");

    form.cmbLHO().clear();
    for (int i = 0; i < orgColl.size(); i++)
    {
        OrgLiteVo vo = orgColl.get(i);
        form.cmbLHO().newRow(vo, vo.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addCCAToCombo(OrgLiteVo orgLiteVo) 
{
    LocSiteLiteVoCollection coll = null;

    coll = domain.listCCAs(orgLiteVo); 

    if(coll == null)
        return;

    form.cmbCCA().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        LocSiteLiteVo vo = coll.get(i);
        if(vo != null)
        {
            form.cmbCCA().newRow(vo, vo.getName());
        }
    }
}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public LocSiteLiteVoCollection listCCAs(OrgLiteVo lho)
{
    if (!lho.getID_OrganisationIsNotNull())
        return null;

    // WDEV-12550 - Added condition and parameters to filter only locations records of type CCA 
    StringBuffer hql = new StringBuffer();
    hql.append(" from LocSite as ls");
    hql.append(" where");
    hql.append(" ls.isActive =:active");
    hql.append(" and ls.isRIE is null");
    hql.append(" and ls.isVirtual =:virtual");
    hql.append(" and ls.type.id = :CCA");
    hql.append(" and ls.parentOrganisation.id =:lhoId order by ls.name asc");

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(getDomainFactory().find(hql.toString(), new String[] { "active", "virtual", "CCA", "lhoId" }, new Object[] { Boolean.TRUE, Boolean.FALSE, LocationType.CCA.getID(), lho.getID_Organisation() }));
}
项目:openMAXIMS    文件:Logic.java   
private TreeNode add(TreeNode parentNode, OrgLiteVo organization)
{
    if (organization == null || organization.getName() == null)
        return null;

    if (!hasAllowedLocations(organization, engine.getLoggedInUser()))
    {
        return null;
    }

    TreeNode node;

    if (parentNode == null)
        node = form.treeLocation().getNodes().add(organization, organization.getName());
    else
        node = parentNode.getNodes().add(organization, organization.getName());

    node.setExpandedImage(form.getImages().Admin.Organisation);
    node.setCollapsedImage(form.getImages().Admin.Organisation);
    addLoadingNode(node);
    node.setExpanded(false);
    return node;
}
项目:openMAXIMS    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private TreeNode add(TreeNode parentNode, OrgLiteVo organization)
{
    if (organization == null || organization.getName() == null)
        return null;

    if (!hasAllowedLocations(organization, engine.getLoggedInUser()))
    {
        return null;
    }

    TreeNode node;

    if (parentNode == null)
        node = form.treeLocation().getNodes().add(organization, organization.getName());
    else
        node = parentNode.getNodes().add(organization, organization.getName());

    node.setExpandedImage(form.getImages().Admin.Organisation);
    node.setCollapsedImage(form.getImages().Admin.Organisation);
    addLoadingNode(node);
    node.setExpanded(false);
    return node;
}
项目:openmaxims-linux    文件:Logic.java   
private void processExpand(TreeNode node)
{
    if (node == null)
        return;

    node.getNodes().clear();

    Object value = node.getValue();

    if (value instanceof OrgLiteVo)
    {
        loadData(node, (OrgLiteVo) value);
    }
    else if (value instanceof LocSiteLiteVo)
    {
        loadData(node, (LocSiteLiteVo) value);
    }
    else if (value instanceof LocationLiteVo)
    {
        loadData(node, (LocationLiteVo) value);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:openMAXIMS    文件:PdsDomainHelperImpl.java   
@Override
public OrgLiteVo getPracticeByTaxonomyCode(String code, TaxonomyType type)
{
    String hql = "select org from Organisation as org left join org.codeMappings as tax left join tax.taxonomyName as lkp\r\n" + 
            "where (tax.taxonomyCode = :taxonomyCode and lkp.id = :type) order by org.id asc ";

    List<?> list = getDomainFactory().find(hql, new String[] {"taxonomyCode", "type"}, new Object[] {code, type.getID()});

    if(list != null && list.size() > 0)
        return OrgLiteVoAssembler.create((Organisation) list.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCmbLHOValueChanged() throws PresentationLogicException 
{
    form.cmbCCA().clear();
    form.cmbSector().clear();
    form.cmbPHN().clear();

    if(form.cmbLHO().getValue() instanceof OrgLiteVo)
    {
        addCCAToCombo(form.cmbLHO().getValue());
    }

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void initialiseOnwardTab()
{
    form.setMode(FormMode.VIEW);

    //load SecondaryCareProviders 
    OrgLiteVoCollection voCollOrg = domain.listAllSuppliers();

    form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().clear();
    for(OrgLiteVo voOrg: voCollOrg)
        form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().newRow(voOrg, voOrg.getName());

    form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);

    form.lyrDetail().tabOnwardReferral().cmbReferredInto().setRequired(true);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:LocationTurningpointProvider.java   
public Boolean hasDiagnosticReferral(OrgLiteVo voOrg) 
{
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private TreeNode add(OrgLiteVo organization)
{
    return add(null, organization);
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:AvoinApotti    文件:Logic.java   
private ReferralsRecordingVo populateDataFromScreen(ReferralsRecordingVo rrVo) 
{
    rrVo.setReferralSource(form.lyr().tabReferralDetails().cmbSourceofReferral().getValue());

    if(!form.lyr().tabReferralDetails().chkSupplyHCPDetails().getValue()){
        if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof MedicVo) 
        {
            rrVo.setReferredBy((Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredByGP(null);
        }
        else if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo) 
        {
            rrVo.setReferredByGP((GpShortVo)form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredBy(null);
        }

        if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof LocShortVo){
            rrVo.setReferredtoLocation((LocShortVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
            rrVo.setRefOrgaCode(null);
        }
        else if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof OrgLiteVo){
            rrVo.setReferredtoLocation(null);
            rrVo.setRefOrgaCode((OrgLiteVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
        }

        rrVo.setSuppliedReferralDetails(null);
    }
    else{
        SuppliedReferralDetailsVo voSuppliedReferralDetails = new SuppliedReferralDetailsVo();
        voSuppliedReferralDetails.setName(form.lyr().tabReferralDetails().txtHCPName().getValue());
        voSuppliedReferralDetails.setServiceLocation(form.lyr().tabReferralDetails().txtLocation().getValue());
        voSuppliedReferralDetails.setAddress(form.lyr().tabReferralDetails().txtAddress().getValue());
        voSuppliedReferralDetails.setWorkPhone(form.lyr().tabReferralDetails().txtWorkPhone().getValue());
        voSuppliedReferralDetails.setMobilePhone(form.lyr().tabReferralDetails().txtMobilePhone().getValue());
        voSuppliedReferralDetails.setEmailAddress(form.lyr().tabReferralDetails().txtEmail().getValue());
        rrVo.setSuppliedReferralDetails(voSuppliedReferralDetails);

        rrVo.setReferredtoLocation(null);
        rrVo.setReferredByGP(null);
        rrVo.setReferredBy(null);
    }

    rrVo.setReferralPriority(form.lyr().tabReferralDetails().cmbPriority().getValue());
    rrVo.setDateSent(form.lyr().tabReferralDetails().dteDecisionToRefer().getValue());
    rrVo.setDateReceived(form.lyr().tabReferralDetails().dteRecieptReferral().getValue());
    rrVo.setReferralHCP(form.lyr().tabReferralDetails().qmbReferredTo().getValue());
    //rrVo.setReferredBy(form.lyr().tabReferralDetails().qmbHCPName().getValue());
    rrVo.setSpecialtyFunctionCode(form.lyr().tabReferralDetails().cmbSpecialtyCode().getValue());
    rrVo.setReasonForReferral(form.lyr().tabReferralDetails().cmbReasonReferral().getValue());
    rrVo.setDiscipline(form.lyr().tabReferralDetails().cmbDiscipline().getValue());
    rrVo.setReferralStatus(form.lyr().tabReferralDetails().cmbStatus().getValue());
    rrVo.setDetails(form.lyr().tabReferralDetails().txtDelayResonComments().getValue());

    if (rrVo.getRecordingMOS() == null && form.getLocalContext().getLoggedInMOSIsNotNull())
        rrVo.setRecordingMOS(form.getLocalContext().getLoggedInMOS());

    rrVo.setAssessment(form.lyr().tabAssessment().customControlAssessment().getPatientAssessment());

    return rrVo;
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocationsForMos() {

    form.lyr().tabReferralDetails().cmbLocations().clear();

    if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof Hcp){
        Hcp voHcp = (Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        MemberOfStaffShortVo voMosShort = voHcp != null ? voHcp.getMos() : null;

        if (voMosShort != null)
        {

            LocShortVoCollection voLocShortVoColl = domain.listLocationsForMemberOfStaff(voHcp.getMos());

            if (voLocShortVoColl != null)
            {
                for (int i = 0; i < voLocShortVoColl.size(); i++)
                {
                    if (voHcp.getMosIsNotNull())
                    {
                        form.lyr().tabReferralDetails().cmbLocations().newRow(voLocShortVoColl.get(i), voLocShortVoColl.get(i).getName());
                        form.lyr().tabReferralDetails().cmbLocations().setValue(voLocShortVoColl.get(i));
                    }
                }

            }

            form.lyr().tabReferralDetails().txtEmail().setValue(voMosShort.getEmailAddress());
            form.lyr().tabReferralDetails().txtMobilePhone().setValue(voMosShort.getMobile());

        }
    }
    else if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo){
        GpShortVo voGpShort = (GpShortVo) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        for (int i = 0; i < voGpShort.getPractices().size(); i++)
        {
            form.lyr().tabReferralDetails().cmbLocations().newRow((OrgLiteVo)voGpShort.getPractices().get(i).getPractice(), voGpShort.getPractices().get(i).getPractice().getName());
            form.lyr().tabReferralDetails().cmbLocations().setValue(voGpShort.getPractices().get(i));
        }

        form.lyr().tabReferralDetails().txtEmail().setValue(voGpShort.getEmailAddress());
        form.lyr().tabReferralDetails().txtMobilePhone().setValue(voGpShort.getMobile());
    }
}
项目:openMAXIMS    文件:LocationTurningpointProvider.java   
public Boolean hasDiagnosticReferral(OrgLiteVo voOrg) 
{
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private TreeNode add(OrgLiteVo organization)
{
    return add(null, organization);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    form.cmbCCA().setEnabled(form.getMode().equals(FormMode.EDIT) && form.cmbLHO().getValue() instanceof OrgLiteVo);
    form.cmbSector().setEnabled(form.getMode().equals(FormMode.EDIT) && form.cmbCCA().getValue() instanceof LocSiteLiteVo);
    form.cmbPHN().setEnabled(form.getMode().equals(FormMode.EDIT) && form.cmbSector().getValue() instanceof LocationLiteVo);
}
项目:openMAXIMS    文件:Logic.java   
private ReferralsRecordingVo populateDataFromScreen(ReferralsRecordingVo rrVo) 
{
    rrVo.setReferralSource(form.lyr().tabReferralDetails().cmbSourceofReferral().getValue());

    if(!form.lyr().tabReferralDetails().chkSupplyHCPDetails().getValue()){
        if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof MedicVo) 
        {
            rrVo.setReferredBy((Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredByGP(null);
        }
        else if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo) 
        {
            rrVo.setReferredByGP((GpShortVo)form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredBy(null);
        }

        if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof LocShortVo){
            rrVo.setReferredtoLocation((LocShortVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
            rrVo.setRefOrgaCode(null);
        }
        else if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof OrgLiteVo){
            rrVo.setReferredtoLocation(null);
            rrVo.setRefOrgaCode((OrgLiteVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
        }

        rrVo.setSuppliedReferralDetails(null);
    }
    else{
        SuppliedReferralDetailsVo voSuppliedReferralDetails = new SuppliedReferralDetailsVo();
        voSuppliedReferralDetails.setName(form.lyr().tabReferralDetails().txtHCPName().getValue());
        voSuppliedReferralDetails.setServiceLocation(form.lyr().tabReferralDetails().txtLocation().getValue());
        voSuppliedReferralDetails.setAddress(form.lyr().tabReferralDetails().txtAddress().getValue());
        voSuppliedReferralDetails.setWorkPhone(form.lyr().tabReferralDetails().txtWorkPhone().getValue());
        voSuppliedReferralDetails.setMobilePhone(form.lyr().tabReferralDetails().txtMobilePhone().getValue());
        voSuppliedReferralDetails.setEmailAddress(form.lyr().tabReferralDetails().txtEmail().getValue());
        rrVo.setSuppliedReferralDetails(voSuppliedReferralDetails);

        rrVo.setReferredtoLocation(null);
        rrVo.setReferredByGP(null);
        rrVo.setReferredBy(null);
    }

    rrVo.setReferralPriority(form.lyr().tabReferralDetails().cmbPriority().getValue());
    rrVo.setDateSent(form.lyr().tabReferralDetails().dteDecisionToRefer().getValue());
    rrVo.setDateReceived(form.lyr().tabReferralDetails().dteRecieptReferral().getValue());
    rrVo.setReferralHCP(form.lyr().tabReferralDetails().qmbReferredTo().getValue());
    //rrVo.setReferredBy(form.lyr().tabReferralDetails().qmbHCPName().getValue());
    rrVo.setSpecialtyFunctionCode(form.lyr().tabReferralDetails().cmbSpecialtyCode().getValue());
    rrVo.setReasonForReferral(form.lyr().tabReferralDetails().cmbReasonReferral().getValue());
    rrVo.setDiscipline(form.lyr().tabReferralDetails().cmbDiscipline().getValue());
    rrVo.setReferralStatus(form.lyr().tabReferralDetails().cmbStatus().getValue());
    rrVo.setDetails(form.lyr().tabReferralDetails().txtDelayResonComments().getValue());

    if (rrVo.getRecordingMOS() == null && form.getLocalContext().getLoggedInMOSIsNotNull())
        rrVo.setRecordingMOS(form.getLocalContext().getLoggedInMOS());

    rrVo.setAssessment(form.lyr().tabAssessment().customControlAssessment().getPatientAssessment());

    return rrVo;
}
项目:openMAXIMS    文件:Logic.java   
private void loadLocationsForMos() {

    form.lyr().tabReferralDetails().cmbLocations().clear();

    if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof Hcp){
        Hcp voHcp = (Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        MemberOfStaffShortVo voMosShort = voHcp != null ? voHcp.getMos() : null;

        if (voMosShort != null)
        {

            LocShortVoCollection voLocShortVoColl = domain.listLocationsForMemberOfStaff(voHcp.getMos());

            if (voLocShortVoColl != null)
            {
                for (int i = 0; i < voLocShortVoColl.size(); i++)
                {
                    if (voHcp.getMosIsNotNull())
                    {
                        form.lyr().tabReferralDetails().cmbLocations().newRow(voLocShortVoColl.get(i), voLocShortVoColl.get(i).getName());
                        form.lyr().tabReferralDetails().cmbLocations().setValue(voLocShortVoColl.get(i));
                    }
                }

            }

            form.lyr().tabReferralDetails().txtEmail().setValue(voMosShort.getEmailAddress());
            form.lyr().tabReferralDetails().txtMobilePhone().setValue(voMosShort.getMobile());

        }
    }
    else if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo){
        GpShortVo voGpShort = (GpShortVo) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        for (int i = 0; i < voGpShort.getPractices().size(); i++)
        {
            form.lyr().tabReferralDetails().cmbLocations().newRow((OrgLiteVo)voGpShort.getPractices().get(i).getPractice(), voGpShort.getPractices().get(i).getPractice().getName());
            form.lyr().tabReferralDetails().cmbLocations().setValue(voGpShort.getPractices().get(i));
        }

        form.lyr().tabReferralDetails().txtEmail().setValue(voGpShort.getEmailAddress());
        form.lyr().tabReferralDetails().txtMobilePhone().setValue(voGpShort.getMobile());
    }
}
项目:openMAXIMS    文件:LocationTurningpointProvider.java   
public Boolean hasDiagnosticReferral(OrgLiteVo voOrg) 
{
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private TreeNode add(OrgLiteVo organization)
{
    return add(null, organization);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:openMAXIMS    文件:Logic.java   
private ReferralsRecordingVo populateDataFromScreen(ReferralsRecordingVo rrVo) 
{
    rrVo.setReferralSource(form.lyr().tabReferralDetails().cmbSourceofReferral().getValue());

    if(!form.lyr().tabReferralDetails().chkSupplyHCPDetails().getValue()){
        if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof MedicVo) 
        {
            rrVo.setReferredBy((Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredByGP(null);
        }
        else if (form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo) 
        {
            rrVo.setReferredByGP((GpShortVo)form.lyr().tabReferralDetails().qmbReferredBy().getValue());
            rrVo.setReferredBy(null);
        }

        if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof LocShortVo){
            rrVo.setReferredtoLocation((LocShortVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
            rrVo.setRefOrgaCode(null);
        }
        else if(form.lyr().tabReferralDetails().cmbLocations().getValue() instanceof OrgLiteVo){
            rrVo.setReferredtoLocation(null);
            rrVo.setRefOrgaCode((OrgLiteVo)form.lyr().tabReferralDetails().cmbLocations().getValue());
        }

        rrVo.setSuppliedReferralDetails(null);
    }
    else{
        SuppliedReferralDetailsVo voSuppliedReferralDetails = new SuppliedReferralDetailsVo();
        voSuppliedReferralDetails.setName(form.lyr().tabReferralDetails().txtHCPName().getValue());
        voSuppliedReferralDetails.setServiceLocation(form.lyr().tabReferralDetails().txtLocation().getValue());
        voSuppliedReferralDetails.setAddress(form.lyr().tabReferralDetails().txtAddress().getValue());
        voSuppliedReferralDetails.setWorkPhone(form.lyr().tabReferralDetails().txtWorkPhone().getValue());
        voSuppliedReferralDetails.setMobilePhone(form.lyr().tabReferralDetails().txtMobilePhone().getValue());
        voSuppliedReferralDetails.setEmailAddress(form.lyr().tabReferralDetails().txtEmail().getValue());
        rrVo.setSuppliedReferralDetails(voSuppliedReferralDetails);

        rrVo.setReferredtoLocation(null);
        rrVo.setReferredByGP(null);
        rrVo.setReferredBy(null);
    }

    rrVo.setReferralPriority(form.lyr().tabReferralDetails().cmbPriority().getValue());
    rrVo.setDateSent(form.lyr().tabReferralDetails().dteDecisionToRefer().getValue());
    rrVo.setDateReceived(form.lyr().tabReferralDetails().dteRecieptReferral().getValue());
    rrVo.setReferralHCP(form.lyr().tabReferralDetails().qmbReferredTo().getValue());
    //rrVo.setReferredBy(form.lyr().tabReferralDetails().qmbHCPName().getValue());
    rrVo.setSpecialtyFunctionCode(form.lyr().tabReferralDetails().cmbSpecialtyCode().getValue());
    rrVo.setReasonForReferral(form.lyr().tabReferralDetails().cmbReasonReferral().getValue());
    rrVo.setDiscipline(form.lyr().tabReferralDetails().cmbDiscipline().getValue());
    rrVo.setReferralStatus(form.lyr().tabReferralDetails().cmbStatus().getValue());
    rrVo.setDetails(form.lyr().tabReferralDetails().txtDelayResonComments().getValue());

    if (rrVo.getRecordingMOS() == null && form.getLocalContext().getLoggedInMOSIsNotNull())
        rrVo.setRecordingMOS(form.getLocalContext().getLoggedInMOS());

    rrVo.setAssessment(form.lyr().tabAssessment().customControlAssessment().getPatientAssessment());

    return rrVo;
}
项目:openMAXIMS    文件:Logic.java   
private void loadLocationsForMos() {

    form.lyr().tabReferralDetails().cmbLocations().clear();

    if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof Hcp){
        Hcp voHcp = (Hcp) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        MemberOfStaffShortVo voMosShort = voHcp != null ? voHcp.getMos() : null;

        if (voMosShort != null)
        {

            LocShortVoCollection voLocShortVoColl = domain.listLocationsForMemberOfStaff(voHcp.getMos());

            if (voLocShortVoColl != null)
            {
                for (int i = 0; i < voLocShortVoColl.size(); i++)
                {
                    if (voHcp.getMosIsNotNull())
                    {
                        form.lyr().tabReferralDetails().cmbLocations().newRow(voLocShortVoColl.get(i), voLocShortVoColl.get(i).getName());
                        form.lyr().tabReferralDetails().cmbLocations().setValue(voLocShortVoColl.get(i));
                    }
                }

            }

            form.lyr().tabReferralDetails().txtEmail().setValue(voMosShort.getEmailAddress());
            form.lyr().tabReferralDetails().txtMobilePhone().setValue(voMosShort.getMobile());

        }
    }
    else if(form.lyr().tabReferralDetails().qmbReferredBy().getValue() instanceof GpShortVo){
        GpShortVo voGpShort = (GpShortVo) form.lyr().tabReferralDetails().qmbReferredBy().getValue();

        for (int i = 0; i < voGpShort.getPractices().size(); i++)
        {
            form.lyr().tabReferralDetails().cmbLocations().newRow((OrgLiteVo)voGpShort.getPractices().get(i).getPractice(), voGpShort.getPractices().get(i).getPractice().getName());
            form.lyr().tabReferralDetails().cmbLocations().setValue(voGpShort.getPractices().get(i));
        }

        form.lyr().tabReferralDetails().txtEmail().setValue(voGpShort.getEmailAddress());
        form.lyr().tabReferralDetails().txtMobilePhone().setValue(voGpShort.getMobile());
    }
}