Java Code Examples for ims.core.vo.lookups.TaxonomyType.equals()

The following are Jave code examples for showing how to use equals() of the ims.core.vo.lookups.TaxonomyType class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void loadCmbExternalCode()
{
	form.cmbExternalCode().clear();
	TaxonomyTypeCollection coll = LookupHelper.getTaxonomyType(domain.getLookupService());
	for (int i = 0; i < coll.size(); i++)
	{
		TaxonomyType inst = coll.get(i);
		if ((inst.equals(TaxonomyType.READ3) ||
			inst.equals(TaxonomyType.SNOMED) ||
			inst.equals(TaxonomyType.ICD10) ||
			inst.equals(TaxonomyType.NAT_SPEC_CODE) ||
			inst.equals(TaxonomyType.NAT_TREAT_CODE) ||
			inst.equals(TaxonomyType.OPCS4) ||
			inst.equals(TaxonomyType.VTM) ||
			inst.equals(TaxonomyType.VMP) ||
			inst.equals(TaxonomyType.AMP))				
			&& inst.isActive())
		{
			form.cmbExternalCode().newRow(inst, inst.getText());
		}
	}
	
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void loadCmbExternalCode()
{
	form.cmbExternalCode().clear();
	TaxonomyTypeCollection coll = LookupHelper.getTaxonomyType(domain.getLookupService());
	for (int i = 0; i < coll.size(); i++)
	{
		TaxonomyType inst = coll.get(i);
		if ((inst.equals(TaxonomyType.READ3) ||
			inst.equals(TaxonomyType.SNOMED) ||
			inst.equals(TaxonomyType.ICD10) ||
			inst.equals(TaxonomyType.NAT_SPEC_CODE) ||
			inst.equals(TaxonomyType.NAT_TREAT_CODE) ||
			inst.equals(TaxonomyType.OPCS4) ||
			inst.equals(TaxonomyType.VTM) ||
			inst.equals(TaxonomyType.VMP) ||
			inst.equals(TaxonomyType.AMP) ||
			inst.equals(TaxonomyType.NAT_LOC_CODE) ||
			inst.equals(TaxonomyType.NAT_GP_CODE) ||
			inst.equals(TaxonomyType.CCG))			
			&& inst.isActive()) 
		{
			form.cmbExternalCode().newRow(inst, inst.getText());
		}
	}
	
}
 
Example 3
Project: AvoinApotti   File: Patient_SummaryImpl.java   Source Code and License Vote up 6 votes
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType)
{
	if (contactType == null)
		return null;

	LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
	LookupInstVo instMap = getMappings(instContactType);
	LookupMappingVoCollection mapColl = instMap.getMappings();
	for (int j = 0; j < mapColl.size(); j++)
	{
		LookupMappingVo valueObject = mapColl.get(j);
		TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
		if (taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING))
		{
			Integer codeVal = Integer.valueOf(valueObject.getExtCode());
			WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
			for (int i = 0; i < collWorklistContactType.size(); i++)
			{
				if (codeVal == collWorklistContactType.get(i).getId())
					return collWorklistContactType.get(i);
			}
		}
	}

	return null;
}
 
Example 4
Project: AvoinApotti   File: PatientSummaryImpl.java   Source Code and License Vote up 6 votes
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType) {
	if (contactType == null) return null;
	
	LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
	LookupInstVo instMap = getMappings(instContactType);
	LookupMappingVoCollection mapColl = instMap.getMappings();
	for (int j = 0; j < mapColl.size(); j++)
	{
		LookupMappingVo valueObject = mapColl.get(j);
		TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
		if(taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING)){
			Integer codeVal = Integer.valueOf(valueObject.getExtCode());
			WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
			for(int i=0;i<collWorklistContactType.size();i++)
			{
				if(codeVal == collWorklistContactType.get(i).getId())
					return collWorklistContactType.get(i);
			}
		}
	}
	
	return null;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private boolean checkExchequerCodeAndTypeUnchangedAndStillValid()
{
	if (form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size() > 0)
	{
		for (int i = 0; i < form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().size(); i++)
		{
			TaxonomyMap mp = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(i).getValue();
			if (mp != null && mp.getTaxonomyName() != null && mp.getTaxonomyName().equals(TaxonomyType.EXCH))
			{
				if (!NTPFExchequerCodingChecks.checkCodeIs60NNNNNorNNNN(form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(i).getcolCode()))
				{
					engine.showMessage("GL code must be 7 digits starting with 60 and the last digits of the GL code must be the same as the procedures exchequer code.");
					return false;
				}
				// WDEV-4194
				TaxonomyType codeType = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(i).getcolExtCodeType();
				if (!codeType.equals(mp.getTaxonomyName()))
				{
					engine.showMessage("An External Code Type has been changed from Exchequer to " + codeType.getText() + ". Please change and save again.");
					return false;
				}

				int indexExch = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(i).getcolCode().indexOf(mp.getTaxonomyCode());

				if (indexExch >= 0)
				{
					int lenStr = form.lyr1().Edit().lyrActivityFunction().tabPageActivity().grdActivityTaxonomy().getRows().get(i).getcolCode().length();
					int lenExchCode = mp.getTaxonomyCode().length();
					if (indexExch + lenExchCode == lenStr)
						return true;
					else
					{
						engine.showMessage("The Exchequer code saved does not have the original configured code at the end of the edited code.");
						return false;
					}
				}
				else
				{
					engine.showMessage("The Exchequer code saved does not match the Exchequer code for the configured Procedure or" + " it does not have the original configured code at the end of the edited code.");

					return false;
				}
			}
		}
	}
	return true;
}