Java Code Examples for ims.core.vo.TaxonomyMap

The following are top voted examples for showing how to use ims.core.vo.TaxonomyMap. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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();
		}
	}
}
 
Example 3
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 4
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 5
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 6
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 

}
 
Example 7
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
/**
* 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");
	}		
}
 
Example 8
Project: AvoinApotti   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 10
Project: AvoinApotti   File: VoMapper.java   View source code 6 votes vote down vote up
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");

}
 
Example 11
Project: AvoinApotti   File: VoMapper.java   View source code 6 votes vote down vote up
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");
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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());
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * 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);
		}	
	}			
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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");

	}
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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);
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 26
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 27
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 28
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 29
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
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; 

}
 
Example 30
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
/**
* 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");
	}		
}
 
Example 31
Project: AvoinApotti   File: TaxonomySearchCmpImpl.java   View source code 6 votes vote down vote up
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; 
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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");
			}
		}
	}
	
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@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();
	}

}
 
Example 34
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
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);
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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());
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
/**
 * 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);
		}	
	}			
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
/**
 * 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);
		}	
	}			
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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();
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
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;
}
 
Example 40
Project: openMAXIMS   File: TaxonomySearchImpl.java   View source code 6 votes vote down vote up
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; 
}