Java 类ims.core.vo.lookups.OrganisationType 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateDataFromScreen() 
{
    OrganisationVo voOrganisation = form.getGlobalContext().Admin
            .getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
            .getOrganisationVo() : new OrganisationVo();
    PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
            .getAddress()
            : new PersonAddress();
    voAddress.setLine1(form.txtOrgAdd1().getValue());
    voAddress.setLine2(form.txtOrgAdd2().getValue());
    voAddress.setLine3(form.txtOrgAdd3().getValue());
    voAddress.setLine4(form.txtOrgAdd4().getValue());
    voAddress.setLine5(form.txtOrgAdd5().getValue());
    voAddress.setCounty(form.cmbCounty().getValue());
    voAddress.setPhone(form.txtOrgPhone().getValue());
    voAddress.setFax(form.txtOrgFax().getValue());
    voAddress.setPostCode(form.txtPostCode().getValue());

    voOrganisation.setAddress(voAddress);

    voOrganisation.setIsActive(Boolean.TRUE);
    voOrganisation.setName(form.txtOrgName().getValue());
    voOrganisation.setType(OrganisationType.GPP);

    form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
项目:AvoinApotti    文件:Logic.java   
/**
 * This functions sets up a practice for save and calls doSavePractice
 * @return boolean indicating success (true)
 */
private boolean savePractice()
{
    OrganisationVo practice = new OrganisationVo();

    if (form.getLocalContext().getPracticeIsNotNull())
        practice = form.getLocalContext().getPractice();
    practice = populatePracticeData(practice);

    practice.setType(OrganisationType.GPP);

    // this code adds a surgery to the value object if USE_GP_SURGERIES is false and if one doesn't already exist 
    // added to allow the ntpf to work as if using only practices. 
    if ( !practice.getLocationSitesIsNotNull())
    {               
        if (!canUseSurgery())
            practice = createOneMatchingChildSurgery(practice);
    }

    return doSavePractice(practice);
}
项目:AvoinApotti    文件:Logic.java   
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
    if(value == null)
        value = new ims.core.vo.OrgShortVo();

    PersonAddress voPersonAdress = new PersonAddress();
    voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
    voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
    voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
    voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
    voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
    voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
    voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());      
    voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
    voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

    value.setAddress(voPersonAdress);

    value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
    value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
    value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
    value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
    return value;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public String getActiveHospitalCodeForClinic(ClinicRefVo clinicRefVo, TaxonomyType taxonomyType)
{
    DomainFactory factory = getDomainFactory();
    Clinic clinic = (Clinic)factory.getDomainObject(clinicRefVo);
    if (clinic==null)
        return null;

    Location loc = clinic.getClinicLocation();

    while (loc!=null&&(loc.isIsActive()&&loc.getType()!=null&&loc.getType().equals(getDomLookup(OrganisationType.HOSPITAL))))
    {
        loc=loc.getParentLocation();
    }
    if(loc!=null)
        return loc.getExtCode(taxonomyType.getID());
    return null;
}
项目:AvoinApotti    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    OrganisationVo voOrganisation = form.getGlobalContext().Admin
            .getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
            .getOrganisationVo() : new OrganisationVo();
    PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
            .getAddress()
            : new PersonAddress();
    voAddress.setLine1(form.txtOrgAdd1().getValue());
    voAddress.setLine2(form.txtOrgAdd2().getValue());
    voAddress.setLine3(form.txtOrgAdd3().getValue());
    voAddress.setLine4(form.txtOrgAdd4().getValue());
    voAddress.setLine5(form.txtOrgAdd5().getValue());
    voAddress.setCounty(form.cmbCounty().getValue());
    voAddress.setPhone(form.txtOrgPhone().getValue());
    voAddress.setFax(form.txtOrgFax().getValue());
    voAddress.setPostCode(form.txtPostCode().getValue());

    voOrganisation.setAddress(voAddress);

    voOrganisation.setIsActive(Boolean.TRUE);
    voOrganisation.setName(form.txtOrgName().getValue());
    voOrganisation.setType(OrganisationType.GPP);

    form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * This functions sets up a practice for save and calls doSavePractice
 * @return boolean indicating success (true)
 */
private boolean savePractice()
{
    OrganisationVo practice = new OrganisationVo();

    if (form.getLocalContext().getPracticeIsNotNull())
        practice = form.getLocalContext().getPractice();
    practice = populatePracticeData(practice);

    practice.setType(OrganisationType.GPP);

    // this code adds a surgery to the value object if USE_GP_SURGERIES is false and if one doesn't already exist 
    // added to allow the ntpf to work as if using only practices. 
    if ( !practice.getLocationSitesIsNotNull())
    {               
        if (!canUseSurgery())
            practice = createOneMatchingChildSurgery(practice);
    }

    return doSavePractice(practice);
}
项目:openMAXIMS    文件:Logic.java   
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
    if(value == null)
        value = new ims.core.vo.OrgShortVo();

    PersonAddress voPersonAdress = new PersonAddress();
    voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
    voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
    voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
    voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
    voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
    voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
    voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());      
    voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
    voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

    value.setAddress(voPersonAdress);

    value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
    value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
    value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
    value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
    return value;
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    OrganisationVo voOrganisation = form.getGlobalContext().Admin
            .getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
            .getOrganisationVo() : new OrganisationVo();
    PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
            .getAddress()
            : new PersonAddress();
    voAddress.setLine1(form.txtOrgAdd1().getValue());
    voAddress.setLine2(form.txtOrgAdd2().getValue());
    voAddress.setLine3(form.txtOrgAdd3().getValue());
    voAddress.setLine4(form.txtOrgAdd4().getValue());
    voAddress.setLine5(form.txtOrgAdd5().getValue());
    voAddress.setCounty(form.cmbCounty().getValue());
    voAddress.setPhone(form.txtOrgPhone().getValue());
    voAddress.setFax(form.txtOrgFax().getValue());
    voAddress.setPostCode(form.txtPostCode().getValue());

    voOrganisation.setAddress(voAddress);

    voOrganisation.setIsActive(Boolean.TRUE);
    voOrganisation.setName(form.txtOrgName().getValue());
    voOrganisation.setType(OrganisationType.GPP);

    form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * This functions sets up a practice for save and calls doSavePractice
 * @return boolean indicating success (true)
 */
private boolean savePractice()
{
    OrganisationVo practice = new OrganisationVo();

    if (form.getLocalContext().getPracticeIsNotNull())
        practice = form.getLocalContext().getPractice();
    practice = populatePracticeData(practice);

    practice.setType(OrganisationType.GPP);

    // this code adds a surgery to the value object if USE_GP_SURGERIES is false and if one doesn't already exist 
    // added to allow the ntpf to work as if using only practices. 
    if ( !practice.getLocationSitesIsNotNull())
    {               
        if (!canUseSurgery())
            practice = createOneMatchingChildSurgery(practice);
    }

    return doSavePractice(practice);
}
项目:openMAXIMS    文件:Logic.java   
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
    if(value == null)
        value = new ims.core.vo.OrgShortVo();

    PersonAddress voPersonAdress = new PersonAddress();
    voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
    voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
    voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
    voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
    voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
    voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
    voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());      
    voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
    voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

    value.setAddress(voPersonAdress);

    value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
    value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
    value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
    value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
    return value;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public String getActiveHospitalCodeForClinic(ClinicRefVo clinicRefVo, TaxonomyType taxonomyType)
{
    DomainFactory factory = getDomainFactory();
    Clinic clinic = (Clinic)factory.getDomainObject(clinicRefVo);
    if (clinic==null)
        return null;

    Location loc = clinic.getClinicLocation();

    while (loc!=null&&(loc.isIsActive()&&loc.getType()!=null&&loc.getType().equals(getDomLookup(OrganisationType.HOSPITAL))))
    {
        loc=loc.getParentLocation();
    }
    if(loc!=null)
        return loc.getExtCode(taxonomyType.getID());
    return null;
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateDataFromScreen() 
{
    OrganisationVo voOrganisation = form.getGlobalContext().Admin
            .getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
            .getOrganisationVo() : new OrganisationVo();
    PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
            .getAddress()
            : new PersonAddress();
    voAddress.setLine1(form.txtOrgAdd1().getValue());
    voAddress.setLine2(form.txtOrgAdd2().getValue());
    voAddress.setLine3(form.txtOrgAdd3().getValue());
    voAddress.setLine4(form.txtOrgAdd4().getValue());
    voAddress.setLine5(form.txtOrgAdd5().getValue());
    voAddress.setCounty(form.cmbCounty().getValue());
    voAddress.setPhone(form.txtOrgPhone().getValue());
    voAddress.setFax(form.txtOrgFax().getValue());
    voAddress.setPostCode(form.txtPostCode().getValue());

    voOrganisation.setAddress(voAddress);

    voOrganisation.setIsActive(Boolean.TRUE);
    voOrganisation.setName(form.txtOrgName().getValue());
    voOrganisation.setType(OrganisationType.GPP);

    form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * This functions sets up a practice for save and calls doSavePractice
 * @return boolean indicating success (true)
 */
private boolean savePractice()
{
    OrganisationVo practice = new OrganisationVo();

    if (form.getLocalContext().getPracticeIsNotNull())
        practice = form.getLocalContext().getPractice();
    practice = populatePracticeData(practice);

    practice.setType(OrganisationType.GPP);

    // this code adds a surgery to the value object if USE_GP_SURGERIES is false and if one doesn't already exist 
    // added to allow the ntpf to work as if using only practices. 
    if ( !practice.getLocationSitesIsNotNull())
    {               
        if (!canUseSurgery())
            practice = createOneMatchingChildSurgery(practice);
    }

    return doSavePractice(practice);
}
项目:openmaxims-linux    文件:Logic.java   
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
    if(value == null)
        value = new ims.core.vo.OrgShortVo();

    PersonAddress voPersonAdress = new PersonAddress();
    voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
    voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
    voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
    voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
    voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
    voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
    voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());      
    voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
    voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

    value.setAddress(voPersonAdress);

    value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
    value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
    value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
    value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
    return value;
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public String getActiveHospitalCodeForClinic(ClinicRefVo clinicRefVo, TaxonomyType taxonomyType)
{
    DomainFactory factory = getDomainFactory();
    Clinic clinic = (Clinic)factory.getDomainObject(clinicRefVo);
    if (clinic==null)
        return null;

    Location loc = clinic.getClinicLocation();

    while (loc!=null&&(loc.isIsActive()&&loc.getType()!=null&&loc.getType().equals(getDomLookup(OrganisationType.HOSPITAL))))
    {
        loc=loc.getParentLocation();
    }
    if(loc!=null)
        return loc.getExtCode(taxonomyType.getID());
    return null;
}
项目:AvoinApotti    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:AvoinApotti    文件:Logic.java   
private OrganisationVo populatePracticeData(OrganisationVo value)
{           
    value.setAddress(populateAddressData(AddressType.PRACTICE));  // WDEV-15936 - specify address type 
    value.setName(form.ctnDetails().txtDetailsName().getValue());
    value.setIsActive(new Boolean(form.ctnDetails().chkDetailsActive().getValue()));
    value.setCodeMappings(getCodeMappings());
    value.setComment(form.ctnDetails().txtDetailsComment().getValue());
    value.setType(OrganisationType.GPP);
    value.setCommChannels(populateCommChannelsFromScreen());
    value.setPctCode(form.ctnDetails().txtPCT().getValue());
    value.setParent(null);

    return value;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param b
 */
private void populateSupplierCollection(Boolean bActive) 
{
    OrgShortVo voOrg = new OrgShortVo();

    voOrg.setName(form.txtSupplierName().getValue());

    OrgShortVoCollection voCollOrg = domain.listOrganisationForType(OrganisationType.SUPPLIER, voOrg, bActive);

    if(voCollOrg == null || voCollOrg.size() == 0)
    {
        engine.showMessage("No results found.");
    }

    OrgShortVoCollection voCollActiveOrgs = new OrgShortVoCollection();
    OrgShortVoCollection voCollInactiveOrgs = new OrgShortVoCollection();

    for(int i=0;i<voCollOrg.size();i++)
    {
        if(voCollOrg.get(i).getIsActiveIsNotNull() && voCollOrg.get(i).getIsActive().booleanValue())
            voCollActiveOrgs.add(voCollOrg.get(i));
        else
            voCollInactiveOrgs.add(voCollOrg.get(i));
    }

    form.getLocalContext().setActiveSuppliers(voCollActiveOrgs);
    form.getLocalContext().setInActiveSuppliers(voCollInactiveOrgs);    
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
private List listDomOrganisation(OrgShortVo filter)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID() + " and o.type.id != " + OrganisationType.GPP.getID();//wdev-5364
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    if (filter.getNameIsNotNull() && filter.getName().length() > 0)
    {
        condStr.append(" o.upperName like :OrgName");
        markers.add("OrgName");
        values.add(filter.getName().toUpperCase() + "%");
        andStr = " and ";

        hql += andStr + condStr.toString();
        orgs = factory.find(hql, markers, values);
    }
    else
    {
        orgs = factory.find(hql);
    }
    return orgs;
}
项目:AvoinApotti    文件:LocationServiceImpl.java   
public OrgShortVoCollection listOrganisation()
{
    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";
    List orgs = null;

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID();

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);

    condStr.append(andStr + " o.parentOrganisation is null");
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);

    return OrgShortVoAssembler.createOrgShortVoCollectionFromOrganisation(orgs).sort();
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:AvoinApotti    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:Logic.java   
private OrganisationVo populatePracticeData(OrganisationVo value)
{           
    value.setAddress(populateAddressData(AddressType.PRACTICE));  // WDEV-15936 - specify address type 
    value.setName(form.ctnDetails().txtDetailsName().getValue());
    value.setIsActive(new Boolean(form.ctnDetails().chkDetailsActive().getValue()));
    value.setCodeMappings(getCodeMappings());
    value.setComment(form.ctnDetails().txtDetailsComment().getValue());
    value.setType(OrganisationType.GPP);
    value.setCommChannels(populateCommChannelsFromScreen());
    value.setPctCode(form.ctnDetails().txtPCT().getValue());
    value.setParent(null);

    return value;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param b
 */
private void populateSupplierCollection(Boolean bActive) 
{
    OrgShortVo voOrg = new OrgShortVo();

    voOrg.setName(form.txtSupplierName().getValue());

    OrgShortVoCollection voCollOrg = domain.listOrganisationForType(OrganisationType.SUPPLIER, voOrg, bActive);

    if(voCollOrg == null || voCollOrg.size() == 0)
    {
        engine.showMessage("No results found.");
    }

    OrgShortVoCollection voCollActiveOrgs = new OrgShortVoCollection();
    OrgShortVoCollection voCollInactiveOrgs = new OrgShortVoCollection();

    for(int i=0;i<voCollOrg.size();i++)
    {
        if(voCollOrg.get(i).getIsActiveIsNotNull() && voCollOrg.get(i).getIsActive().booleanValue())
            voCollActiveOrgs.add(voCollOrg.get(i));
        else
            voCollInactiveOrgs.add(voCollOrg.get(i));
    }

    form.getLocalContext().setActiveSuppliers(voCollActiveOrgs);
    form.getLocalContext().setInActiveSuppliers(voCollInactiveOrgs);    
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
private List listDomOrganisation(OrgShortVo filter)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID() + " and o.type.id != " + OrganisationType.GPP.getID();//wdev-5364
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    if (filter.getNameIsNotNull() && filter.getName().length() > 0)
    {
        condStr.append(" o.upperName like :OrgName");
        markers.add("OrgName");
        values.add(filter.getName().toUpperCase() + "%");
        andStr = " and ";

        hql += andStr + condStr.toString();
        orgs = factory.find(hql, markers, values);
    }
    else
    {
        orgs = factory.find(hql);
    }
    return orgs;
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public OrgShortVoCollection listOrganisation()
{
    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";
    List orgs = null;

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID();

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);

    condStr.append(andStr + " o.parentOrganisation is null");
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);

    return OrgShortVoAssembler.createOrgShortVoCollectionFromOrganisation(orgs).sort();
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public OrgLiteVoCollection listLHOs()
{
    StringBuffer hql = new StringBuffer();
    hql.append(" from Organisation o");
    hql.append(" where");
    hql.append(" o.type.id = :lho and o.isActive = 1 order by o.name asc");

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(getDomainFactory().find(hql.toString(), new String[] { "lho" }, new Object[] { OrganisationType.LHO.getID() }));
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:Logic.java   
private OrganisationVo populatePracticeData(OrganisationVo value)
{           
    value.setAddress(populateAddressData(AddressType.PRACTICE));  // WDEV-15936 - specify address type 
    value.setName(form.ctnDetails().txtDetailsName().getValue());
    value.setIsActive(new Boolean(form.ctnDetails().chkDetailsActive().getValue()));
    value.setCodeMappings(getCodeMappings());
    value.setComment(form.ctnDetails().txtDetailsComment().getValue());
    value.setType(OrganisationType.GPP);
    value.setCommChannels(populateCommChannelsFromScreen());
    value.setPctCode(form.ctnDetails().txtPCT().getValue());
    value.setParent(null);

    return value;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param b
 */
private void populateSupplierCollection(Boolean bActive) 
{
    OrgShortVo voOrg = new OrgShortVo();

    voOrg.setName(form.txtSupplierName().getValue());

    OrgShortVoCollection voCollOrg = domain.listOrganisationForType(OrganisationType.SUPPLIER, voOrg, bActive);

    if(voCollOrg == null || voCollOrg.size() == 0)
    {
        engine.showMessage("No results found.");
    }

    OrgShortVoCollection voCollActiveOrgs = new OrgShortVoCollection();
    OrgShortVoCollection voCollInactiveOrgs = new OrgShortVoCollection();

    for(int i=0;i<voCollOrg.size();i++)
    {
        if(voCollOrg.get(i).getIsActiveIsNotNull() && voCollOrg.get(i).getIsActive().booleanValue())
            voCollActiveOrgs.add(voCollOrg.get(i));
        else
            voCollInactiveOrgs.add(voCollOrg.get(i));
    }

    form.getLocalContext().setActiveSuppliers(voCollActiveOrgs);
    form.getLocalContext().setInActiveSuppliers(voCollInactiveOrgs);    
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
private List listDomOrganisation(OrgShortVo filter)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID() + " and o.type.id != " + OrganisationType.GPP.getID();//wdev-5364
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    if (filter.getNameIsNotNull() && filter.getName().length() > 0)
    {
        condStr.append(" o.upperName like :OrgName");
        markers.add("OrgName");
        values.add(filter.getName().toUpperCase() + "%");
        andStr = " and ";

        hql += andStr + condStr.toString();
        orgs = factory.find(hql, markers, values);
    }
    else
    {
        orgs = factory.find(hql);
    }
    return orgs;
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public OrgShortVoCollection listOrganisation()
{
    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";
    List orgs = null;

    String hql = " from Organisation o where o.type.id != " + OrganisationType.SUPPLIER.getID();

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);

    condStr.append(andStr + " o.parentOrganisation is null");
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);

    return OrgShortVoAssembler.createOrgShortVoCollectionFromOrganisation(orgs).sort();
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}