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

项目: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   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
    if(formName.equals(form.getForms().Core.TaxonomySearch) && result.equals(DialogResult.OK))
    {
        TaxonomyMap voTaxonomy = form.getGlobalContext().Core.getTaxonomyMap();
        if(voTaxonomy != null)
        {
            //Check for duplicates
            if(form.grdTaxonomy().getValues().indexOf(voTaxonomy) < 0)
                setTaxonomyGridRowData(form.grdTaxonomy().getRows().newRow(true), form.getGlobalContext().Core.getTaxonomyMap());
        }
    }
    if(formName.equals(form.getForms().Core.QuestionAnswerType) && result.equals(DialogResult.OK))
    {
        QuestionAnswerTypeVo voAnswType = form.getGlobalContext().Core.getQuestionAnswerType();
        if(voAnswType != null)
        {
            GenForm.grdAnswerTypeRow row = form.grdAnswerType().getRowByValue(voAnswType);
            if(row == null)
                row = form.grdAnswerType().getRows().newRow(true);   
            setAnswerGridRowData(row, voAnswType);
            enableContextMenu();
        }
    }
}
项目: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   
/**
 * 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    文件:VoMapper.java   
protected final void renderMemberOfStaffShortVoToXCNNatCode(MemberOfStaffShortVo mos, XCN xcn,ProviderSystemVo providerSystem) throws DataTypeException
{
    LOG.debug("VoMapper renderMemberOfStaffShortVoToXCNNatCode: entry");

    if(mos!=null&&mos.getNameIsNotNull()&&mos.getName().getForenameIsNotNull())
        xcn.getGivenName().setValue(mos.getName().getForename());
    if(mos!=null&&mos.getNameIsNotNull()&&mos.getName().getSurnameIsNotNull())
        xcn.getFamilyName().getSurname().setValue(mos.getName().getSurname());
    if(mos!=null&&mos.getNationalConsCode()!=null)
    {
        xcn.getIDNumber().setValue(mos.getNationalConsCode());
    }
    else if(mos!=null)
    {
        TaxonomyMap mapping = mos.getExternalCode(providerSystem.getCodeSystem());
        if (mapping != null)
        {
            xcn.getIDNumber().setValue(mapping.getTaxonomyCode());          
        }
    }
    LOG.debug("VoMapper renderMemberOfStaffShortVoToXCNNatCode: exit");

}
项目:AvoinApotti    文件:VoMapper.java   
protected final void renderGpShortVoToXCN(GpShortVo gp,XCN xcn,ProviderSystemVo providerSystem) throws DataTypeException
{
    LOG.debug("VoMapper renderGpShortVoToXCN: entry");
    if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getForenameIsNotNull())
        xcn.getGivenName().setValue(gp.getName().getForename());
    if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getSurnameIsNotNull())
        xcn.getFamilyName().getSurname().setValue(gp.getName().getSurname());
    TaxonomyMap mapping = null;
    if (gp!=null)
        mapping = gp.getExternalCode(TaxonomyType.NAT_GP_CODE);
    if(mapping!=null)
    {
        xcn.getIDNumber().setValue(mapping.getTaxonomyCode());
    }
    if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getTitleIsNotNull())
        xcn.getPrefixEgDR().setValue(svc.getRemoteLookup(gp.getName().getTitle().getID(), providerSystem.getCodeSystem().getText()));
    LOG.debug("VoMapper renderGpShortVoToXCN: exit");
}
项目: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 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 void newActivityTaxonomy()
{
    // check that an Activity is selected       
    if (form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivity().getSelectedRow() != null)
    {
        grdActivityTaxonomyRow row;
        row = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().newRow();  
        TaxonomyMap tmap = new TaxonomyMap();
        tmap.setTaxonomyName(row.getcolExtCodeType());
        tmap.setTaxonomyCode(row.getcolCode());
        row.setValue(tmap);
    }
    else if (form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivity().getRows().size() == 0)
    {
        engine.showMessage("An Activity must be added to the Activities List above");

    }
}
项目: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    文件: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    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result)  throws PresentationLogicException 
{
    if (result.equals(DialogResult.OK))
    {
        if (formName.equals(form.getForms().Core.TaxonomySearch))
        {
            if (form.getGlobalContext().Core.getTaxonomyMapIsNotNull())
            {
                TaxonomyMap tax = form.getGlobalContext().Core.getTaxonomyMap();
                // WDEV-4338 07/04/08 code below Checks for duplicate
                // taxonomies used by investigations
                if (domain.checkDuplicateTaxonomyMapping(tax))
                {
                    if(!checkDuplicateTaxonomyMappingInGrid(tax))
                        addTaxonomyRow(tax);
                    else
                        engine.showMessage("The taxonomy code " + tax.getTaxonomyCode() +  " is already in use");
                }
                else
                    engine.showMessage("The " + tax.getTaxonomyName() + " taxonomy " + tax.getDescription() + " is already in use by another container");
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
    if (formName.equals(form.getForms().Core.TaxonomySearch) && result.equals(DialogResult.OK))
    {
        TaxonomyMap taxonomyMap = form.getGlobalContext().Core.getTaxonomyMap();
        if (taxonomyMap != null)
        {
            newDiagnosis(taxonomyMap);
        }

    }
    else if ( (formName.equals(form.getForms().Clinical.SelectPatientOrLocallyConfiguredDiagnosis)) && (result.equals(DialogResult.OK)) )
    {
        doAddFromLocalSearch();
    }

}
项目:openmaxims-linux    文件: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);
    }
}
项目:openMAXIMS    文件: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());
}
项目:openmaxims-linux    文件: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);
        }   
    }           
}
项目:openMAXIMS    文件: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);
        }   
    }           
}
项目:openMAXIMS    文件:Logic.java   
private void addNewRow(TaxonomyType type)
{
    TaxonomyMap voTaxonomy = new TaxonomyMap();
    voTaxonomy.setTaxonomyName(type);
    form.getGlobalContext().Core.setTaxonomyMap(voTaxonomy);

    form.getLocalContext().setSelectedInpatientRow(null);
    form.getLocalContext().setSelectedOutpatientRow(null);

    form.lyrTabs().tabInpatientCoding().grdCoding().setValue(null);
    form.lyrTabs().tabOutpatientCoding().grdOutpatientCoding().setValue(null);

    engine.open(form.getForms().Core.TaxonomySearch);

    updateControlsState();
}
项目:openmaxims-linux    文件: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;
}
项目: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; 
}