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

项目:AvoinApotti    文件:Logic.java   
private void listCodes(TaxonomyMapCollection rcColl)
{
    if (rcColl == null)
        return;

    GenForm.grdResultsRow row;
    rcColl.sort();
    for (int i = 0; i < rcColl.size(); i++)
    {
        TaxonomyMap ps = rcColl.get(i);
        row = form.grdResults().getRows().newRow();
        row.setcolName(ps.getDescription());
        row.setTooltipForcolName(ps.getDescription());
        row.setcolExtCode(ps.getTaxonomyCode());
        row.setValue(ps);
    }
    form.lblCount().setValue("Total: " + rcColl.size());
}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchVTMCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from VTM vt where upper(vt.name) like :description";//WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//WDEV-15115         
    for (int i = 0; i < codesList.size(); i++)
    {
        VTM vtm = (VTM)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.VTM);
        taxMap.setDescription(vtm.getName());
        taxMap.setTaxonomyCode(String.valueOf(vtm.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchVMPCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from VMP vm where upper(vm.name) like :description";//WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//WDEV-15115         
    for (int i = 0; i < codesList.size(); i++)
    {
        VMP vmp = (VMP)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.VMP);
        taxMap.setDescription(vmp.getName());
        taxMap.setTaxonomyCode(String.valueOf(vmp.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchAMPCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from AMP am where upper(am.name) like :description";//  WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//   WDEV-15115          
    for (int i = 0; i < codesList.size(); i++)
    {           
        AMP amp = (AMP)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.AMP);
        taxMap.setDescription(amp.getName());
        taxMap.setTaxonomyCode(String.valueOf(amp.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchOPCS4Codes(TaxonomyMap filter) 
{       
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from Opcs4 opcs4 where upper(opcs4.opname4) like :description or upper(opcs4.opname3) like :description)";//WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//WDEV-15115         
    for (int i = 0; i < codesList.size(); i++)
    {
        Opcs4 proc = (Opcs4)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.OPCS4);
        taxMap.setDescription(proc.getOpname3() + " - " + proc.getOpname4());
        taxMap.setTaxonomyCode(proc.getOpcode());           
        coll.add(taxMap);
    }       
    return coll; 

}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
/**
* Search Read Codes
*/
private TaxonomyMapCollection searchReadCodes(TaxonomyMap filter)  throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.DomainRuntimeException
{
    String searchType = ConfigFlag.DOM.READ_CODES_SEARCH_TYPE.getValue();
    if (searchType.equals("SQL"))
    {
        return searchReadCodesSql(filter);          
    }
    else if(searchType.equals("DTO"))
    {
        return searchReadCodesDto(filter);          
    }
    else
    {
        throw new ims.domain.exceptions.DomainInterfaceException("Value for READ_CODES_SEARCH_TYPE of " + searchType + " is invalid. Valid values are SQL or DTO");
    }       
}
项目:AvoinApotti    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchICD10Codes(TaxonomyMap filter) throws ims.domain.exceptions.DomainRuntimeException
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from Icd10AmProc p where (upper(p.ascii_desc) like :description) or upper(p.ascii_short_desc) like :description)";//WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords); //WDEV-15115        
    for (int i = 0; i < codesList.size(); i++)
    {
        Icd10AmProc proc = (Icd10AmProc)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.ICD10);
        taxMap.setDescription(proc.getAscii_short_desc() + " - " + proc.getAscii_desc());
        taxMap.setTaxonomyCode(proc.getCode_id());          
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populates the Taxonomy Mappings grid for a given TaxonomyMapCollection
 * @param TaxonomyMapCollection
 * @return void
 */
private void populateTaxonomyMappings(TaxonomyMapCollection coll)
{
    form.lyrDetails().tabMappings().grdMappings().getRows().clear();//WDEV-1921

    if (coll != null)
    {
        grdMappingsRow row = null;
        for (int i=0; i < coll.size(); i++)
        {
            row = form.lyrDetails().tabMappings().grdMappings().getRows().newRow();//WDEV-1921                  
            row.setcolExtCodeType(coll.get(i).getTaxonomyName());                   
            row.setcolCode(coll.get(i).getTaxonomyCode());                  
            row.setValue(coll.get(i));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Returns a TaxonomyMapCollection of all the mappings onscreen. 
 * @param void
 * @return TaxonomyMapCollection
 */
private TaxonomyMapCollection getMappings() 
{
    TaxonomyMapCollection voTaxonomyMapCollection =  new TaxonomyMapCollection();

    for (int i = 0; i < form.lyrDetails().tabMappings().grdMappings().getRows().size(); i++)//WDEV-11921
    {
        grdMappingsRow row = form.lyrDetails().tabMappings().grdMappings().getRows().get(i);//WDEV-11921
        TaxonomyMap voTaxonomyMap = row.getValue() != null?row.getValue():new TaxonomyMap();
        voTaxonomyMap.setTaxonomyCode(row.getcolCode());            
        voTaxonomyMap.setTaxonomyName(row.getcolExtCodeType());
        voTaxonomyMapCollection.add(voTaxonomyMap);
    }

    return voTaxonomyMapCollection;
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getMappingsNoWarnings()
{
    TaxonomyMapCollection voTaxonomyMapCollection =  new TaxonomyMapCollection();

    for (int i = 0; i < form.grdMappings().getRows().size(); i++)
    {
        GenForm.grdMappingsRow row = form.grdMappings().getRows().get(i);
        TaxonomyMap voTaxonomyMap = row.getValue() != null ? row.getValue() : new TaxonomyMap();
        voTaxonomyMap.setTaxonomyCode(row.getcolCode());            
        voTaxonomyMap.setTaxonomyName((TaxonomyType) row.getcolExtCodeType());

        if (row.getcolCode() != null || row.getcolExtCodeType() != null)
            voTaxonomyMapCollection.add(voTaxonomyMap);
    }

    return voTaxonomyMapCollection;
}
项目:AvoinApotti    文件:Logic.java   
private void populateTaxonomyMappings(TaxonomyMapCollection coll)
{
    clear();
    if (coll != null)
    {
        grdMappingsRow row = null;
        for (int i=0; i < coll.size(); i++)
        {
            row = form.grdMappings().getRows().newRow();

            row.setcolExtCodeType(coll.get(i).getTaxonomyName());
            row.setcolCode(coll.get(i).getTaxonomyCode());                  

            row.setValue(coll.get(i));
            row.setReadOnly(true);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listCodes(TaxonomyMapCollection rcColl)
{
    if (rcColl == null)
        return;

    GenForm.grdResultsRow row;
    rcColl.sort();
    for (int i = 0; i < rcColl.size(); i++)
    {
        TaxonomyMap ps = rcColl.get(i);
        row = form.grdResults().getRows().newRow();
        row.setcolName(ps.getDescription());
        row.setTooltipForcolName(ps.getDescription());
        row.setcolExtCode(ps.getTaxonomyCode());
        row.setValue(ps);
    }
    form.lblCount().setValue("Total: " + rcColl.size());
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings()
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < form.ctnDetails().grdDetailsMappings().getRows().size(); i++)
    {
        grdDetailsMappingsRow row = form.ctnDetails().grdDetailsMappings().getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
public GpShortVo getNewGpBasedOnSearchCriteria()
{
    GpShortVo voGpShort = new GpShortVo();
    voGpShort.setName(new PersonName());

    String forname = form.txtSearchForename().getValue();
    String surname = form.txtSearchSurname().getValue();
    TaxonomyType type = form.cmbSearchCodeType().getValue();

    voGpShort.getName().setForename(forname);
    voGpShort.getName().setUpperForename(forname != null ? forname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperForenameMaxLength(), forname.length())) : null);
    voGpShort.getName().setSurname(surname);
    voGpShort.getName().setUpperSurname(surname != null ? surname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperSurnameMaxLength(), surname.length())) : null);

    if (type != null)
    {
        voGpShort.setCodeMappings(new TaxonomyMapCollection());
        TaxonomyMap taxonomyMap = new TaxonomyMap();
        taxonomyMap.setTaxonomyName(type);
        taxonomyMap.setTaxonomyCode(form.txtSearchCode().getValue());
        voGpShort.getCodeMappings().add(taxonomyMap);
    }

    return voGpShort;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Returns a collection of all taxonomy mapping populated on screen.
 * @param null
 * @return TaxonomyMapCollection
 */
private TaxonomyMapCollection getCodeMappings()
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdMappings().getRows().size(); i++)
    {
        grdMappingsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdMappings().getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populates the taxonomy mapping grid using the given TaxonomyMapCollection
 * @param TaxonomyMapCollection
 */
private void populateMappingsGrid(TaxonomyMapCollection coll)
{
    form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdMappings().getRows().clear();

    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            TaxonomyMap map = coll.get(i);
            grdMappingsRow row = form.ctnGPDetails().lyrGPDetails().tabGPDetails().grdMappings().getRows().newRow();
            row.setcolExtCodeType(map.getTaxonomyName());
            row.setcolCode(map.getTaxonomyCode());
            row.setTooltipForcolCode(map.getTaxonomyCode());
            row.setValue(map);
        }   
    }           
}
项目:AvoinApotti    文件:Logic.java   
private String formatTaxonomy(ims.core.vo.TaxonomyMapCollection tm)
{
    String out = "";
    if ((tm != null) && (tm.size() > 0))
    {
        if (tm.size() > 1)
            out += makeNewLine(new Integer(1));

        for (int i = 0; i < tm.size(); i++)
        {
            out += makeTextile("* Taxonomy: *", "SlateBlue", "tahoma", "12");
            out += makeTextile(tm.get(i).getTaxonomyNameIsNotNull() ? tm.get(i).getTaxonomyName().toString() : "", "black", "tahoma", "12");
            out += makeTextile("* Code: *", "SlateBlue", "tahoma", "12");
            out += makeTextile((tm.get(i).getTaxonomyCodeIsNotNull() ? tm.get(i).getTaxonomyCode().toString() : ""), "black", "tahoma", "12");
            out += makeNewLine(new Integer(1));
        }
    }
    return out;
}
项目:AvoinApotti    文件:Logic.java   
private String checkExchequerCodeIsUnique(ValueObjectRef voRef, TaxonomyMapCollection collTaxMap)
{
    if(ConfigFlag.DOM.ENABLE_EXCHEQUER_CODES_VALIDATION.getValue())
    {
        if (voRef != null && collTaxMap != null)
        {
            for (int i = 0; i < collTaxMap.size(); i++)
            {
                if (collTaxMap.get(i) != null
                    && collTaxMap.get(i).getTaxonomyNameIsNotNull() 
                    && collTaxMap.get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    String dupExchequer = domain.checkExchequerCodeIsUnique(collTaxMap.get(i).getTaxonomyCode(), voRef);

                    if(dupExchequer != null)
                        return dupExchequer;
                }

            }

        }
    }
    return null;

}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(grdMappingsGrid grid)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < grid.getRows().size(); i++)
    {
        grdMappingsRow row = grid.getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(MemberOfStaffShortVo voMos)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection(); 
    for (int i = 0; i < form.grdMappings().getRows().size(); i++)
    {
        grdMappingsRow row = form.grdMappings().getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = row.getValue();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);

        }
    }
    return coll;
}
项目:AvoinApotti    文件:Logic.java   
private void populateMappingsGrid(TaxonomyMapCollection coll)
{
    form.grdMappings().getRows().clear();

    if (coll == null)
        return;

    for (int i = 0; i < coll.size(); i++)
    {
        TaxonomyMap map = coll.get(i);
        grdMappingsRow row = form.grdMappings().getRows().newRow();
        row.setcolExtCodeType(map.getTaxonomyName());
        row.setcolCode(map.getTaxonomyCode());
        row.setTooltipForcolCode(map.getTaxonomyCode());
        row.setValue(map);
    }
}
项目:AvoinApotti    文件:Logic.java   
public OrganisationWithSitesVo getNewPracticeBasedOnSearchCriteria()
{
    OrganisationWithSitesVo voOrganisation = new OrganisationWithSitesVo();

    voOrganisation.setName(form.txtName().getValue());
    voOrganisation.setIsActive(Boolean.TRUE);

    voOrganisation.setAddress(new PersonAddress());
    voOrganisation.getAddress().setLine1(form.txtAddress().getValue());

    TaxonomyType taxonomyType = form.cmbType().getValue();
    if(taxonomyType != null)
    {
        TaxonomyMap taxonomyMap = new TaxonomyMap();
        taxonomyMap.setTaxonomyName(taxonomyType);
        taxonomyMap.setTaxonomyCode(form.txtCode().getValue());

        voOrganisation.setCodeMappings(new TaxonomyMapCollection());
        voOrganisation.getCodeMappings().add(taxonomyMap);
    }

    return voOrganisation;
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(grdOrgMappingsGrid grid)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < grid.getRows().size(); i++)
    {
        grdOrgMappingsRow row = grid.getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll.size() > 0 ? coll : null;
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(grdSiteMappingsGrid grid)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < grid.getRows().size(); i++)
    {
        grdSiteMappingsRow row = grid.getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll.size() > 0 ? coll : null;
}
项目:AvoinApotti    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(grdLocMappingsGrid grid)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < grid.getRows().size(); i++)
    {
        grdLocMappingsRow row = grid.getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll.size() > 0 ? coll : null;
}
项目:AvoinApotti    文件:Logic.java   
private String checkExchequerCodeIsUnique(ValueObjectRef voRef, TaxonomyMapCollection collTaxMap)
{
    if(ConfigFlag.DOM.ENABLE_EXCHEQUER_CODES_VALIDATION.getValue())
    {
        if (voRef != null && collTaxMap != null)
        {
            for (int i = 0; i < collTaxMap.size(); i++)
            {
                if (collTaxMap.get(i) != null
                    && collTaxMap.get(i).getTaxonomyNameIsNotNull() 
                    && collTaxMap.get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    String dupExchequer = domain.checkExchequerCodeIsUnique(collTaxMap.get(i).getTaxonomyCode(), voRef);

                    if(dupExchequer != null)
                        return dupExchequer;
                }

            }

        }
    }
    return null;


}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchVTMCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from VTM vt where upper(vt.name) like '%" + filter.getDescription().toUpperCase() + "%'";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {
        VTM vtm = (VTM)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.VTM);
        taxMap.setDescription(vtm.getName());
        taxMap.setTaxonomyCode(String.valueOf(vtm.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchVMPCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from VMP vm where upper(vm.name) like '%" + filter.getDescription().toUpperCase() + "%'";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {
        VMP vmp = (VMP)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.VMP);
        taxMap.setDescription(vmp.getName());
        taxMap.setTaxonomyCode(String.valueOf(vmp.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchAMPCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from AMP am where upper(am.name) like '%" + filter.getDescription().toUpperCase() + "%'";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {           
        AMP amp = (AMP)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.AMP);
        taxMap.setDescription(amp.getName());
        taxMap.setTaxonomyCode(String.valueOf(amp.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchOPCS4Codes(TaxonomyMap filter) 
{       
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from Opcs4 opcs4 where upper(opcs4.opname4) like '%" + filter.getDescription().toUpperCase() + "%' or upper(opcs4.opname3) like '%" + filter.getDescription().toUpperCase() + "%')";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {
        Opcs4 proc = (Opcs4)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.OPCS4);
        taxMap.setDescription(proc.getOpname3() + " - " + proc.getOpname4());
        taxMap.setTaxonomyCode(proc.getOpcode());           
        coll.add(taxMap);
    }       
    return coll; 

}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
/**
* Search Read Codes
*/
private TaxonomyMapCollection searchReadCodes(TaxonomyMap filter)  throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.DomainRuntimeException
{
    String searchType = ConfigFlag.DOM.READ_CODES_SEARCH_TYPE.getValue();
    if (searchType.equals("SQL"))
    {
        return searchReadCodesSql(filter);          
    }
    else if(searchType.equals("DTO"))
    {
        return searchReadCodesDto(filter);          
    }
    else
    {
        throw new ims.domain.exceptions.DomainInterfaceException("Value for READ_CODES_SEARCH_TYPE of " + searchType + " is invalid. Valid values are SQL or DTO");
    }       
}
项目:AvoinApotti    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchICD10Codes(TaxonomyMap filter) throws ims.domain.exceptions.DomainRuntimeException
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from Icd10AmProc p where (upper(p.ascii_desc) like '%" + filter.getDescription().toUpperCase() + "%') or upper(p.ascii_short_desc) like '%" + filter.getDescription().toUpperCase() + "%')";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {
        Icd10AmProc proc = (Icd10AmProc)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.ICD10);
        taxMap.setDescription(proc.getAscii_short_desc() + " - " + proc.getAscii_desc());
        taxMap.setTaxonomyCode(proc.getCode_id());          
        coll.add(taxMap);
    }       
    return coll; 
}
项目:AvoinApotti    文件:ServiceImpl.java   
public String isServiceActivityUnique(TaxonomyMapCollection map, ServiceVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (map != null)
    {
        String result = "";
        for (int i = 0; i < map.size(); i++)
        {
            java.util.List list = factory.find("select s1_1.service.id, s2_1.serviceName, t1_1.taxonomyCode, l1_1.id from ServiceActivity as s1_1 left join s1_1.service as s2_1 left join s1_1.taxonomyMap as t1_1 left join t1_1.taxonomyName as l1_1 where (t1_1.taxonomyCode = :code and s2_1.serviceName <> :name and l1_1.id = :id)", new String[]{"code", "name", "id"}, new Object[]{map.get(i).getTaxonomyCode(), voService.getServiceName(), new Integer(map.get(i).getTaxonomyName().getID())});

            if (list.size() != 0 && map.get(i).getTaxonomyCodeIsNotNull())
                result = result + (map.get(i).getTaxonomyCode() + " ");

        }
        return result;
    }

    return "";
}
项目:openmaxims-linux    文件:Logic.java   
private TaxonomyMapCollection getCodeMappings(grdMappingsGrid grid)
{
    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    for (int i = 0; i < grid.getRows().size(); i++)
    {
        grdMappingsRow row = grid.getRows().get(i);
        if (row.getcolExtCodeType() != null && row.getcolCode() != null)
        {
            TaxonomyMap map = new TaxonomyMap();
            map.setTaxonomyName(row.getcolExtCodeType());
            map.setTaxonomyCode(row.getcolCode());
            coll.add(map);
        }
    }
    return coll;
}
项目:openmaxims-linux    文件:TaxonomySearchCmpImpl.java   
private TaxonomyMapCollection searchOPCS4Codes(TaxonomyMap filter) 
{       
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from Opcs4 opcs4 where upper(opcs4.opname4) like '%" + filter.getDescription().toUpperCase() + "%' or upper(opcs4.opname3) like '%" + filter.getDescription().toUpperCase() + "%')";

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, maxRecords);         
    for (int i = 0; i < codesList.size(); i++)
    {
        Opcs4 proc = (Opcs4)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.OPCS4);
        taxMap.setDescription(proc.getOpname3() + " - " + proc.getOpname4());
        taxMap.setTaxonomyCode(proc.getOpcode());           
        coll.add(taxMap);
    }       
    return coll; 

}
项目:openMAXIMS    文件:Logic.java   
private String getPracticeCodeBasedOnCodeMappings(OrganisationWithSitesVo gpPractice, TaxonomyType taxonomyType)
{
    if (gpPractice==null)
        return null;

    TaxonomyMapCollection collCodeMappings = gpPractice.getCodeMappings();
    for (int i=0; collCodeMappings!=null && i<collCodeMappings.size();i++)
    {
        if (collCodeMappings.get(i)!=null && taxonomyType.equals(collCodeMappings.get(i).getTaxonomyName()))
        {
            return collCodeMappings.get(i).getTaxonomyCode();
        }
    }

    return null;
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public String isServiceActivityUnique(TaxonomyMapCollection map, ServiceVo voService)
{
    DomainFactory factory = getDomainFactory();

    if (map != null)
    {
        String result = "";
        for (int i = 0; i < map.size(); i++)
        {
            java.util.List list = factory.find("select s1_1.service.id, s2_1.serviceName, t1_1.taxonomyCode, l1_1.id from ServiceActivity as s1_1 left join s1_1.service as s2_1 left join s1_1.taxonomyMap as t1_1 left join t1_1.taxonomyName as l1_1 where (t1_1.taxonomyCode = :code and s2_1.serviceName <> :name and l1_1.id = :id)", new String[]{"code", "name", "id"}, new Object[]{map.get(i).getTaxonomyCode(), voService.getServiceName(), new Integer(map.get(i).getTaxonomyName().getID())});

            if (list.size() != 0 && map.get(i).getTaxonomyCodeIsNotNull())
                result = result + (map.get(i).getTaxonomyCode() + " ");

        }
        return result;
    }

    return "";
}
项目:openMAXIMS    文件:MedicodeCodeExportImportHelper.java   
private Object getlocationMapping(Integer id_Location) 
{
    LocationFullVo locations = LocationFullVoAssembler.create((Location)domFactory.getDomainObject(Location.class, id_Location));

    if(locations == null)
        return "";
    TaxonomyMapCollection mappings = locations.getCodeMappings();
    if(mappings != null && mappings.size() > 0)
    {
        for(int i=0; i<mappings.size(); i++)
        {
            ims.core.vo.TaxonomyMap volocMap = mappings.get(i);
            if(volocMap != null && volocMap.getTaxonomyCode() != null && volocMap.getTaxonomyName() != null && volocMap.getTaxonomyName().getID() == TaxonomyType.NAT_LOC_CODE.getID())
            {                   
                return volocMap.getTaxonomyCode();
            }

        }

    }
    return "";


}
项目:openMAXIMS    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchVTMCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from VTM vt where upper(vt.name) like :description";//WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//WDEV-15115         
    for (int i = 0; i < codesList.size(); i++)
    {
        VTM vtm = (VTM)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.VTM);
        taxMap.setDescription(vtm.getName());
        taxMap.setTaxonomyCode(String.valueOf(vtm.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}
项目:openMAXIMS    文件:TaxonomySearchImpl.java   
private TaxonomyMapCollection searchAMPCodes(TaxonomyMap filter) 
{
    int maxRecords = ConfigFlag.DOM.TAXONOMY_SEARCH_MAX_SIZE.getValue();

    DomainFactory factory = getDomainFactory();
    String hqlList  = " from AMP am where upper(am.name) like :description";//  WDEV-15115

    TaxonomyMapCollection coll = new TaxonomyMapCollection();
    List codesList = factory.find(hqlList, new String[] {"description"}, new Object[] {"%" + filter.getDescription().toUpperCase() + "%"}, maxRecords);//   WDEV-15115          
    for (int i = 0; i < codesList.size(); i++)
    {           
        AMP amp = (AMP)codesList.get(i);
        TaxonomyMap taxMap = new TaxonomyMap();
        taxMap.setTaxonomyName(TaxonomyType.AMP);
        taxMap.setDescription(amp.getName());
        taxMap.setTaxonomyCode(String.valueOf(amp.getId()));            
        coll.add(taxMap);
    }       
    return coll; 
}