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

项目:AvoinApotti    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
    if (gpShortVo == null || locSiteShortVo == null)
        return;
    RecipientVo gpRecipVo = new RecipientVo();

    GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
    GpShortVo voGP = (GpShortVo) gpShortVo;

    PersonAddress surgeryAddress = null;

    if (locSiteShortVo.getAddressIsNotNull())
    {
        surgeryAddress = locSiteShortVo.getAddress();
        row.setAddress(surgeryAddress.toDisplayString());
    }

    row.setGP(form.getImages().Admin.StaffBlue);
    gpRecipVo.setName(voGP.getName());
    gpRecipVo.setAddress(surgeryAddress);
    gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

    row.setValue(gpRecipVo);
    row.setAdressee(voGP.getName().toString());

}
项目:AvoinApotti    文件:Logic.java   
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
    if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
    {
        LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
        for (LocSiteShortVo surgery : surgeries)
        {
            if(surgery.getIsActiveIsNotNull() && 
                    surgery.getIsActive().equals(Boolean.TRUE)&&
                    surgery.getPasCode()!=null&&
                    gMCCode!=null&&
                    gMCCode.trim()!=null&&
                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
            {
                surgeriesForGp.add(surgery);
            }
        }
        return surgeriesForGp;
    }
    return null;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from LocSite l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean selectLocation(LocSiteShortVo location)
{
    if(location == null)
        return false;

    for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
    {
        GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
        if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
        {
            row.setcolSelection(true);
            return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateLocations()
{
    form.cmbSite().clear();

    LocSiteShortVoCollection locations = domain.getLocations();
    if(locations != null)
    {
        locations.sort();           
        for(int x = 0; x < locations.size(); x++)
        {
            LocSiteShortVo location = locations.get(x);
            if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
                form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
    if (gpShortVo == null || locSiteShortVo == null)
        return;
    RecipientVo gpRecipVo = new RecipientVo();

    GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
    GpShortVo voGP = (GpShortVo) gpShortVo;

    PersonAddress surgeryAddress = null;

    if (locSiteShortVo.getAddressIsNotNull())
    {
        surgeryAddress = locSiteShortVo.getAddress();
        row.setAddress(surgeryAddress.toDisplayString());
    }

    row.setGP(form.getImages().Admin.StaffBlue);
    gpRecipVo.setName(voGP.getName());
    gpRecipVo.setAddress(surgeryAddress);
    gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

    row.setValue(gpRecipVo);
    row.setAdressee(voGP.getName().toString());

}
项目:openMAXIMS    文件:Logic.java   
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries, String gMCCode)
{
    if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&& surgeries != null)
    {
        LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
        for (LocSiteShortVo surgery : surgeries)
        {
            if(surgery.getIsActiveIsNotNull() && 
                    surgery.getIsActive().equals(Boolean.TRUE)&&
                    surgery.getPasCode()!=null&&
                    gMCCode!=null&&
                    gMCCode.trim()!=null&&
                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
            {
                surgeriesForGp.add(surgery);
            }
        }
        return surgeriesForGp;
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String buildSurgeryDisplayData(LocSiteShortVo surgery, boolean showLabels)
{
    if (surgery == null)
        return "";  
    String displayData = "";

    if (showLabels)
    {   
        displayData =  "Surgery: " + surgery.getName().toString() + (surgery.getAddressIsNotNull() && surgery.getAddress().toDisplayString() != null && surgery.getAddress().toDisplayString().length() > 0 ? "<br/>Address: " + surgery.getAddress().toDisplayString() : "");
    }
    else
    {
        displayData =  surgery.getName().toString() + (surgery.getAddressIsNotNull() && surgery.getAddress().toDisplayString() != null && surgery.getAddress().toDisplayString().length() > 0 ? "<br/>" + surgery.getAddress().toDisplayString() : "");
    }
    if (displayData.contains(",") && displayData.substring(displayData.lastIndexOf(",")+ 1, displayData.length()).trim().length() == 0)
    {       
        displayData = displayData.substring(0, displayData.lastIndexOf(","));
    }

    return displayData;
}
项目:openMAXIMS    文件:Logic.java   
private ValueObject getSelectedValue()
{
    if (form.grdGps().getValue() != null)
        return (GpLiteVo) form.grdGps().getSelectedRow().getValue();

    if (form.dynGrdGps().getValue() != null && form.dynGrdGps().isVisible())
    {
        if (form.dynGrdGps().getValue() instanceof GpLiteVo)
            return (GpLiteVo) form.dynGrdGps().getValue();
        if (form.dynGrdGps().getValue() instanceof GpLiteToPracticeLiteVo)
            return (GpLiteToPracticeLiteVo) form.dynGrdGps().getValue();

        if (form.dynGrdGps().getValue() instanceof LocSiteShortVo)
            return ((LocSiteShortVo) form.dynGrdGps().getValue());
    }
    return null;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from LocSite l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openMAXIMS    文件:GPSearchImpl.java   
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries, String gMCCode)
{
    if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&& surgeries != null)
    {
        LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
        for (LocSiteShortVo surgery : surgeries)
        {
            if(surgery.getIsActiveIsNotNull() && 
                    surgery.getIsActive().equals(Boolean.TRUE)&&
                    surgery.getPasCode()!=null&&
                    gMCCode!=null&&
                    gMCCode.trim()!=null&&
                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
            {
                surgeriesForGp.add(surgery);
            }
        }
        return surgeriesForGp;
    }
    return null;

}
项目:openMAXIMS    文件:GPSearchImpl.java   
private boolean isSurgeryValidforAddress(GPSearchCriteriaVo filter, LocSiteShortVo surgery)
{
    if (surgery != null && filter.getAddressContains() != null && filter.getAddressContains().length() > 0)
    {           
        if (surgery.getIsActiveIsNotNull() && Boolean.TRUE.equals(surgery.getIsActive()) && ((surgery.getNameIsNotNull() && surgery.getName().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) || //WDEV-18828 
                        (surgery.getAddressIsNotNull() &&
                        (surgery.getAddress().getLine1IsNotNull() && surgery.getAddress().getLine1().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase()) ||
                        (surgery.getAddress().getLine2IsNotNull()&& surgery.getAddress().getLine2().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
                        (surgery.getAddress().getLine3IsNotNull()&& surgery.getAddress().getLine3().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) || 
                        (surgery.getAddress().getLine4IsNotNull() && surgery.getAddress().getLine4().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
                        (surgery.getAddress().getLine5IsNotNull() && surgery.getAddress().getLine5().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
                        (surgery.getAddress().getPostCodeIsNotNull() && surgery.getAddress().getPostCode().replace(" ", "").toUpperCase().equals(filter.getAddressContains().replaceAll("%", "").replace(" ", "").toUpperCase()))))))
        {
            return true;
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean selectLocation(LocSiteShortVo location)
{
    if(location == null)
        return false;

    for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
    {
        GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
        if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
        {
            row.setcolSelection(true);
            return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateLocations()
{
    form.cmbSite().clear();

    LocSiteShortVoCollection locations = domain.getLocations();
    if(locations != null)
    {
        locations.sort();           
        for(int x = 0; x < locations.size(); x++)
        {
            LocSiteShortVo location = locations.get(x);
            if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
                form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
    if (gpShortVo == null || locSiteShortVo == null)
        return;
    RecipientVo gpRecipVo = new RecipientVo();

    GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
    GpShortVo voGP = (GpShortVo) gpShortVo;

    PersonAddress surgeryAddress = null;

    if (locSiteShortVo.getAddressIsNotNull())
    {
        surgeryAddress = locSiteShortVo.getAddress();
        row.setAddress(surgeryAddress.toDisplayString());
    }

    row.setGP(form.getImages().Admin.StaffBlue);
    gpRecipVo.setName(voGP.getName());
    gpRecipVo.setAddress(surgeryAddress);
    gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

    row.setValue(gpRecipVo);
    row.setAdressee(voGP.getName().toString());

}
项目:openMAXIMS    文件:Logic.java   
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
    if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
    {
        LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
        for (LocSiteShortVo surgery : surgeries)
        {
            if(surgery.getIsActiveIsNotNull() && 
                    surgery.getIsActive().equals(Boolean.TRUE)&&
                    surgery.getPasCode()!=null&&
                    gMCCode!=null&&
                    gMCCode.trim()!=null&&
                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
            {
                surgeriesForGp.add(surgery);
            }
        }
        return surgeriesForGp;
    }
    return null;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from LocSite l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean selectLocation(LocSiteShortVo location)
{
    if(location == null)
        return false;

    for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
    {
        GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
        if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
        {
            row.setcolSelection(true);
            return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateLocations()
{
    form.cmbSite().clear();

    LocSiteShortVoCollection locations = domain.getLocations();
    if(locations != null)
    {
        locations.sort();           
        for(int x = 0; x < locations.size(); x++)
        {
            LocSiteShortVo location = locations.get(x);
            if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
                form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
    if (gpShortVo == null || locSiteShortVo == null)
        return;
    RecipientVo gpRecipVo = new RecipientVo();

    GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
    GpShortVo voGP = (GpShortVo) gpShortVo;

    PersonAddress surgeryAddress = null;

    if (locSiteShortVo.getAddressIsNotNull())
    {
        surgeryAddress = locSiteShortVo.getAddress();
        row.setAddress(surgeryAddress.toDisplayString());
    }

    row.setGP(form.getImages().Admin.StaffBlue);
    gpRecipVo.setName(voGP.getName());
    gpRecipVo.setAddress(surgeryAddress);
    gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

    row.setValue(gpRecipVo);
    row.setAdressee(voGP.getName().toString());

}
项目:openmaxims-linux    文件:Logic.java   
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
    if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
    {
        LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
        for (LocSiteShortVo surgery : surgeries)
        {
            if(surgery.getIsActiveIsNotNull() && 
                    surgery.getIsActive().equals(Boolean.TRUE)&&
                    surgery.getPasCode()!=null&&
                    gMCCode!=null&&
                    gMCCode.trim()!=null&&
                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
            {
                surgeriesForGp.add(surgery);
            }
        }
        return surgeriesForGp;
    }
    return null;
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
    if (postCode == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = " from LocSite l where l.address.postCode = :postCode ";

    List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

    if (locList != null && locList.size() == 1)
    {
        return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
    }
    else if (locList != null && locList.size() > 1)
    {
        throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean selectLocation(LocSiteShortVo location)
{
    if(location == null)
        return false;

    for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
    {
        GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
        if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
        {
            row.setcolSelection(true);
            return true;
        }
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateLocations()
{
    form.cmbSite().clear();

    LocSiteShortVoCollection locations = domain.getLocations();
    if(locations != null)
    {
        locations.sort();           
        for(int x = 0; x < locations.size(); x++)
        {
            LocSiteShortVo location = locations.get(x);
            if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
                form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void refreshGpDetails(GpShortVo gp, LocSiteShortVo gpSurgery)
{
    form.getGlobalContext().Core.setGPDetails(gp);
    form.getGlobalContext().Core.setGPSurgery(gpSurgery);
    form.imbGP().setTooltip(getGpTooltip(gp, gpSurgery));
    if (gpSurgery != null)
        form.txtGPPractice().setValue(gpSurgery.getName());
    if (gp != null)
        form.txtGPName().setValue(gp.getName().toString());
}
项目:AvoinApotti    文件:DemographicsImpl.java   
private String getMappingForGpSurgery(LocSiteShortVo locSiteShortVo)
{
    if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
        return locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);

    return "";
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:AvoinApotti    文件:AttendanceDetailsImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
    if( locRef == null )
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);

}
项目:AvoinApotti    文件:QuickRegistrationImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}
项目:AvoinApotti    文件:VoMapper.java   
private void populatePatientGPDetailsFromPD1(Patient patVo, PD1 pd1) throws HL7Exception
{
    // As there was an inconsistency between chapter 2 and 3 of the HL7 Specification for
    // PD1 and XON, we have to look for the practice code in the organisation name
    // component.
    String gpCode = pd1.getPatientPrimaryCareProviderNameIDNo(0).getIDNumber().getValue();
    if (gpCode != null)
        patVo.setGp(gpAdmin.getGPByTaxonomyType(gpCode, TaxonomyType.NAT_GP_CODE));
    //TODO: JME: 20060901: McKesson sending the practice code in the org name (1st) component
    //Should be in the ID (3rd) component. Temp fix here.
    String pracCode = pd1.getPatientPrimaryFacility(0).getOrganizationName().getValue();
    String surgeryCode=null;
    if (pd1.getPatientPrimaryFacility().length > 1)
        surgeryCode = pd1.getPatientPrimaryFacility(1).getIDNumber().getValue();
    if (surgeryCode == null)  // wdev-4457
        surgeryCode = pd1.getPatientPrimaryFacility(0).getIDNumber().getValue();

    if (pracCode != null)
    {
        if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&gpCode!=null&&gpCode!=Hl7Null) //
        {
            LocSiteShortVo surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + gpCode+"_"+surgeryCode, TaxonomyType.PAS);
            if(surgery==null)
            {
                surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS);
            }
            patVo.setGpSurgery(surgery);
        }
        else
        {
        patVo.setGpSurgery(orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS));
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param voCollMosOrgLoc
 * @param newNode
 */
private void showOrgForMos(MosOrgLocVoCollection voCollMosOrgLoc, TreeNode mosNode)
{
    mosNode.getNodes().clear();
    for (int i = 0; i < voCollMosOrgLoc.size(); i++)
    {
        MosOrgLocVo vo = voCollMosOrgLoc.get(i);
        TreeNode orgNode = mosNode.getNodes().add(vo.getOrganisation(), vo.getOrganisation().getName());
        orgNode.setCollapsedImage(form.getImages().Admin.Organisation);
        HCPLocationLiteVo.mixedSort(vo.getHCPLocations());
        for (int j = 0; j < vo.getHCPLocations().size(); j++)
        {
            HCPLocationLiteVo locVo = vo.getHCPLocations().get(j);

            StringBuffer sb = new StringBuffer();
            sb.append(locVo.getLocation().getName());
            sb.append(locVo.getAccreditationStatusIsNotNull() ? " ," + locVo.getAccreditationStatus().toString() : "");

            TreeNode locNode = orgNode.getNodes().add(locVo, sb.toString());
            if (j == 0)
                locNode.setExpanded(true);

            if (locVo.getLocation() instanceof LocSiteVo || locVo.getLocation() instanceof LocSiteShortVo)
            {
                locNode.setCollapsedImage(form.getImages().Admin.LocationSite);
                locNode.setExpandedImage(form.getImages().Admin.LocationSite);
            }
            else
            {
                locNode.setCollapsedImage(form.getImages().Admin.Location);
                locNode.setExpandedImage(form.getImages().Admin.Location);
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void addLocationSite(LocSiteShortVo location)
{
    if(location == null)
        return;
    if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() == 0)
        return;

    GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().newRow();
    TemplateLocationShortVo templateLocation = new TemplateLocationShortVo();
    templateLocation.setLocation(location);
    templateLocation.setIsActive(Boolean.TRUE);     
    row.setcolImage(form.getImages().Admin.LocationSite);
    row.setcolName(location.getName());
    row.setValue(templateLocation);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isSelected(LocSiteShortVo location)
{
    if(location == null)
        return false;

    for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
    {
        GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
        if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
            return row.getcolSelection();       
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean locationExists(TemplateLocationShortVoCollection templateLocations, LocSiteShortVo location)
{
    if(templateLocations == null || location == null)
        return false;

    for(int x = 0; x < templateLocations.size(); x++)
    {
        TemplateLocationShortVo item = templateLocations.get(x);
        if(item != null && item.getLocationIsNotNull() && item.getLocation().equals(location))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:MyOrderImpl.java   
private LocSiteShortVo getHospital(Location doLocation)
{
    if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return LocSiteShortVoAssembler.create((LocSite) doLocation);

    while(doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return LocSiteShortVoAssembler.create((LocSite) doLocation);
    }

    return null;
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
    if (locRef == null)
        throw new CodingRuntimeException("Location not provided");

    DomainFactory factory = getDomainFactory();
    LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
    return LocSiteShortVoAssembler.create(doLocation);
}