Java Code Examples for ims.core.clinical.domain.objects.TaxonomyMap

The following are top voted examples for showing how to use ims.core.clinical.domain.objects.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: OcsIfImpl.java   Source Code and License 6 votes vote down vote up
public String getServiceMapping(ServiceRefVo service, LookupInstVo taxType)
{
	if (service == null || taxType == null)
		return null;

	DomainFactory factory = getDomainFactory();
	Service domSvc = (Service)factory.getDomainObject(Service.class, service.getID_Service());
	LookupInstance domTax = getDomLookup(taxType);
	
	for (int i = 0; i < domSvc.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap)domSvc.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().equals(domTax))
			return map.getTaxonomyCode();
	}
	return null;
}
 
Example 2
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9484
 * If this is a nursing clinic i.e. there is a CDS mapping starting with NURSE
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isNursingClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("NURSE"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 3
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * WDEV-13478 
 * If this clinic/service is mapped with 'INPATIENT_NO_SFS' , it indicates that it is an inpatient record
 * without a suitable for surgery record.  It needs to be omitted from Outpatient CDS, and duration of elective
 * wait etc.. need to be retrieved from elsewhere - e.g. Endoscopy
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isInpatientNonSuitableForSurgeryClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("INPATIENT_NO_SFS"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 4
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9720
 * If this is a radiology clinic i.e. there is a CDS mapping starting with RADIOLOGY
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isRadiologyClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("RADIOLOGY"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 5
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
private String getNatSpecialtyCode(Service service) 
{
	if (service == null)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No Service found for referral");
		return null;
	}
			
	if (service.getTaxonomyMap() == null || service.getTaxonomyMap().size() == 0)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No TaxonomyTypes found for this service - " + service.getServiceName());
		return null;
	}
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap taxMap = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (taxMap.getTaxonomyName().getId() == TaxonomyType.NAT_SPEC_CODE.getId())
			return taxMap.getTaxonomyCode();
	}
	
	super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "TaxonomyType NAT_SPEC_CODE not found for this service - " + service.getServiceName());
	return null;
}
 
Example 6
Project: openMAXIMS   File: FullSDSJobImpl.java   Source Code and License 6 votes vote down vote up
private String getTaxonomyCode(Organisation practice, TaxonomyType taxMap)
{
	if(practice == null || taxMap == null)
		return null;
	
	if(practice.getCodeMappings() != null)
	{
		for(int j = 0; j < practice.getCodeMappings().size(); j++)
		{
			Object mapping = practice.getCodeMappings().get(j);
			
			if(mapping instanceof TaxonomyMap)
			{
				if(((TaxonomyMap)mapping).getTaxonomyName() != null  && (taxMap.getID() == ((TaxonomyMap)mapping).getTaxonomyName().getId()))
				{
					return ((TaxonomyMap) mapping).getTaxonomyCode();
				}
			}
		}
	}
	
	return null;
}
 
Example 7
Project: openMAXIMS   File: SDSRequestsJobImpl.java   Source Code and License 6 votes vote down vote up
private String getTaxonomyCode(Organisation practice, TaxonomyType taxMap)
{
	if(practice == null || taxMap == null)
		return null;
	
	if(practice.getCodeMappings() != null)
	{
		for(int j = 0; j < practice.getCodeMappings().size(); j++)
		{
			Object mapping = practice.getCodeMappings().get(j);
			
			if(mapping instanceof TaxonomyMap)
			{
				if(((TaxonomyMap)mapping).getTaxonomyName() != null  && (taxMap.getID() == ((TaxonomyMap)mapping).getTaxonomyName().getId()))
				{
					return ((TaxonomyMap) mapping).getTaxonomyCode();
				}
			}
		}
	}
	
	return null;
}
 
Example 8
Project: openMAXIMS   File: SdsRequestHelper.java   Source Code and License 6 votes vote down vote up
private TaxonomyMap getGPSDSId(Gp gp)
{
	if(gp == null || gp.getCodeMappings() == null)
		return null;
		
	for(int i=0; i<gp.getCodeMappings().size(); i++)
	{
		if(!(gp.getCodeMappings().get(i) instanceof TaxonomyMap))
			continue;
		
		TaxonomyMap taxonomyMap = (TaxonomyMap) gp.getCodeMappings().get(i);
		
		if(taxonomyMap.getTaxonomyName() != null && taxonomyMap.getTaxonomyName().getId() == TaxonomyType.SDSID.getID())
			return taxonomyMap;
	}
	
	return null;
}
 
Example 9
Project: openMAXIMS   File: SdsRequestHelper.java   Source Code and License 6 votes vote down vote up
private TaxonomyMap getTaxonomyMap(Organisation org, TaxonomyType code)
  {
   if(org == null || org.getCodeMappings() == null)
		return null;
		
	for(int i=0; i<org.getCodeMappings().size(); i++)
	{
		if(!(org.getCodeMappings().get(i) instanceof TaxonomyMap))
			continue;
		
		TaxonomyMap taxonomyMap = (TaxonomyMap) org.getCodeMappings().get(i);
		
		if(taxonomyMap.getTaxonomyName() != null && taxonomyMap.getTaxonomyName().getId() == code.getID())
			return taxonomyMap;
	}
	
	return null;
}
 
Example 10
Project: openMAXIMS   File: SdsRequestHelper.java   Source Code and License 6 votes vote down vote up
private String getTaxonomyCode(Organisation practice, TaxonomyType taxMap)
{
	if(practice == null || taxMap == null)
		return null;
	
	if(practice.getCodeMappings() != null)
	{
		for(int j = 0; j < practice.getCodeMappings().size(); j++)
		{
			Object mapping = practice.getCodeMappings().get(j);
			
			if(mapping instanceof TaxonomyMap)
			{
				if(((TaxonomyMap)mapping).getTaxonomyName() != null  && (taxMap.getID() == ((TaxonomyMap)mapping).getTaxonomyName().getId()))
				{
					return ((TaxonomyMap) mapping).getTaxonomyCode();
				}
			}
		}
	}
	
	return null;
}
 
Example 11
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 6 votes vote down vote up
private StringBuffer getDiagnosisCode(Integer id_Diagnosis) 
{
	//returns ICD10 code of diagnosis.mappings
	
	StringBuffer out = new StringBuffer();
	
	out.append("");
	if(id_Diagnosis == null)
		return null;
	
	Diagnosis doDiag = (Diagnosis)domFactory.getDomainObject(Diagnosis.class, id_Diagnosis);
			
	List diagTaxonomyMapColl = doDiag.getTaxonomyMap();
	if(diagTaxonomyMapColl != null && diagTaxonomyMapColl.size() > 0)
	{
		for(int i=0; i<diagTaxonomyMapColl.size(); i++)
		{
			TaxonomyMap doTavonomyMap = (TaxonomyMap)diagTaxonomyMapColl.get(i);
			if(doTavonomyMap != null && doTavonomyMap.getTaxonomyName()!=null && doTavonomyMap.getTaxonomyName().getId() == (ims.core.vo.lookups.TaxonomyType.ICD10.getID()))
			{
				return out.append(doTavonomyMap.getTaxonomyCode());
			}				
		}				
	}
	return out;		
}
 
Example 12
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 6 votes vote down vote up
private Object getExternalCodingConsCode(MemberOfStaffLiteVo mosVo) 
{
	// get GP Code based on patient surgery location
	MemberOfStaff mos = (MemberOfStaff)domFactory.getDomainObject(MemberOfStaff.class, mosVo.getID_MemberOfStaff());
	
	if (mos != null)
	{
		List lstcm = mos.getCodeMappings();
		if(lstcm != null && lstcm.size() > 0)
		{
			for(int i=0; i<lstcm.size(); i++)
			{
				
				ims.core.clinical.domain.objects.TaxonomyMap doTavonomyMap = (ims.core.clinical.domain.objects.TaxonomyMap)lstcm.get(i);
				if(doTavonomyMap != null && doTavonomyMap.getTaxonomyCode() !=null && doTavonomyMap.getTaxonomyName().getId()==(ims.core.vo.lookups.TaxonomyType.NAT_CONS_CODE.getID()))
				{
					return doTavonomyMap.getTaxonomyCode();
				}				
			}				
		}
		
	}
	
	return "";
}
 
Example 13
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 6 votes vote down vote up
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 "";
	
	
}
 
Example 14
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9484
 * If this is a nursing clinic i.e. there is a CDS mapping starting with NURSE
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isNursingClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("NURSE"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 15
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * WDEV-13478 
 * If this clinic/service is mapped with 'INPATIENT_NO_SFS' , it indicates that it is an inpatient record
 * without a suitable for surgery record.  It needs to be omitted from Outpatient CDS, and duration of elective
 * wait etc.. need to be retrieved from elsewhere - e.g. Endoscopy
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isInpatientNonSuitableForSurgeryClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("INPATIENT_NO_SFS"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 16
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9720
 * If this is a radiology clinic i.e. there is a CDS mapping starting with RADIOLOGY
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isRadiologyClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("RADIOLOGY"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 17
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
private String getNatSpecialtyCode(Service service) 
{
	if (service == null)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No Service found for referral");
		return null;
	}
			
	if (service.getTaxonomyMap() == null || service.getTaxonomyMap().size() == 0)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No TaxonomyTypes found for this service - " + service.getServiceName());
		return null;
	}
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap taxMap = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (taxMap.getTaxonomyName().getId() == TaxonomyType.NAT_SPEC_CODE.getId())
			return taxMap.getTaxonomyCode();
	}
	
	super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "TaxonomyType NAT_SPEC_CODE not found for this service - " + service.getServiceName());
	return null;
}
 
Example 18
Project: openMAXIMS   File: OcsIfImpl.java   Source Code and License 6 votes vote down vote up
public String getServiceMapping(ServiceRefVo service, LookupInstVo taxType)
{
	if (service == null || taxType == null)
		return null;

	DomainFactory factory = getDomainFactory();
	Service domSvc = (Service)factory.getDomainObject(Service.class, service.getID_Service());
	LookupInstance domTax = getDomLookup(taxType);
	
	for (int i = 0; i < domSvc.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap)domSvc.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().equals(domTax))
			return map.getTaxonomyCode();
	}
	return null;
}
 
Example 19
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9484
 * If this is a nursing clinic i.e. there is a CDS mapping starting with NURSE
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isNursingClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("NURSE"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 20
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * WDEV-13478 
 * If this clinic/service is mapped with 'INPATIENT_NO_SFS' , it indicates that it is an inpatient record
 * without a suitable for surgery record.  It needs to be omitted from Outpatient CDS, and duration of elective
 * wait etc.. need to be retrieved from elsewhere - e.g. Endoscopy
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isInpatientNonSuitableForSurgeryClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("INPATIENT_NO_SFS"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 21
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9720
 * If this is a radiology clinic i.e. there is a CDS mapping starting with RADIOLOGY
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isRadiologyClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("RADIOLOGY"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 22
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
private String getNatSpecialtyCode(Service service) 
{
	if (service == null)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No Service found for referral");
		return null;
	}
			
	if (service.getTaxonomyMap() == null || service.getTaxonomyMap().size() == 0)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No TaxonomyTypes found for this service - " + service.getServiceName());
		return null;
	}
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap taxMap = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (taxMap.getTaxonomyName().getId() == TaxonomyType.NAT_SPEC_CODE.getId())
			return taxMap.getTaxonomyCode();
	}
	
	super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "TaxonomyType NAT_SPEC_CODE not found for this service - " + service.getServiceName());
	return null;
}
 
Example 23
Project: openmaxims-linux   File: OcsIfImpl.java   Source Code and License 6 votes vote down vote up
public String getServiceMapping(ServiceRefVo service, LookupInstVo taxType)
{
	if (service == null || taxType == null)
		return null;

	DomainFactory factory = getDomainFactory();
	Service domSvc = (Service)factory.getDomainObject(Service.class, service.getID_Service());
	LookupInstance domTax = getDomLookup(taxType);
	
	for (int i = 0; i < domSvc.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap)domSvc.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().equals(domTax))
			return map.getTaxonomyCode();
	}
	return null;
}
 
Example 24
Project: openmaxims-linux   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9484
 * If this is a nursing clinic i.e. there is a CDS mapping starting with NURSE
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isNursingClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("NURSE"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 25
Project: openmaxims-linux   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * WDEV-13478 
 * If this clinic/service is mapped with 'INPATIENT_NO_SFS' , it indicates that it is an inpatient record
 * without a suitable for surgery record.  It needs to be omitted from Outpatient CDS, and duration of elective
 * wait etc.. need to be retrieved from elsewhere - e.g. Endoscopy
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isInpatientNonSuitableForSurgeryClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("INPATIENT_NO_SFS"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 26
Project: openmaxims-linux   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
/**
 * wdev-9720
 * If this is a radiology clinic i.e. there is a CDS mapping starting with RADIOLOGY
 * return true. Otherwise return false.
 * @param factory
 * @param service
 * @return
 */
private boolean isRadiologyClinic(Service service)
{
	if (service == null || service.getTaxonomyMap() == null)
		return false;
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.CDS.getID() &&
				map.getTaxonomyCode().startsWith("RADIOLOGY"))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 27
Project: openmaxims-linux   File: CDSGenerateImpl.java   Source Code and License 6 votes vote down vote up
private String getNatSpecialtyCode(Service service) 
{
	if (service == null)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No Service found for referral");
		return null;
	}
			
	if (service.getTaxonomyMap() == null || service.getTaxonomyMap().size() == 0)
	{
		super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "No TaxonomyTypes found for this service - " + service.getServiceName());
		return null;
	}
	
	for (int i=0; i<service.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap taxMap = (TaxonomyMap) service.getTaxonomyMap().get(i);
		if (taxMap.getTaxonomyName().getId() == TaxonomyType.NAT_SPEC_CODE.getId())
			return taxMap.getTaxonomyCode();
	}
	
	super.createSystemLogEntry(SystemLogType.CDS, SystemLogLevel.WARNING, "TaxonomyType NAT_SPEC_CODE not found for this service - " + service.getServiceName());
	return null;
}
 
Example 28
Project: AvoinApotti   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 29
Project: AvoinApotti   File: BedAdmissionComponentImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 30
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getFirstAttendanceValue(Activity activity, String defaultVal)
{
	if (activity == null || activity.getCodeMappings() == null)
		return defaultVal; 
	
	for (int i=0; i<activity.getCodeMappings().size(); i++)
	{
		TaxonomyMap domMap = (TaxonomyMap) activity.getCodeMappings().get(i);
		if (domMap.getTaxonomyName().getId() == TaxonomyType.CDS.getID())
			return domMap.getTaxonomyCode();
	}
	return defaultVal;
}
 
Example 31
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getPracticeCode(Organisation practice) 
{
  	    // Practice is parent of surgery
	if (practice != null && practice.getCodeMappings() != null)
	{
		for (int i=0; i<practice.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) practice.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return UNKNOWN_PRACTICE;
}
 
Example 32
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getGPCode(Gp gp, String defaultVal) 
{
	if (gp != null && gp.getCodeMappings() != null && gp.getCodeMappings().size() > 0)
	{
		for (int i=0; i<gp.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) gp.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_GP_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return defaultVal;
}
 
Example 33
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNationalLocCode(Location loc, String defaultSiteCode) 
{
	if (loc == null || loc.getCodeMappings() == null || loc.getCodeMappings().size() == 0)
		return defaultSiteCode;
	
	for (int i=0; i<loc.getCodeMappings().size(); i++)
	{
		TaxonomyMap mp = (TaxonomyMap) loc.getCodeMappings().get(i);
		if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
			return mp.getTaxonomyCode();
	}
	
	return defaultSiteCode;
}
 
Example 34
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getICDCode(Diagnosis primaryDiagnosis) 
{
	for (int i=0; i<primaryDiagnosis.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) primaryDiagnosis.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.ICD10.getId())
			return map.getTaxonomyCode();
	}
		
	return null;
}
 
Example 35
Project: AvoinApotti   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNatConsultantCode(Hcp peformedBy) 
{
	if (peformedBy == null)
		return UNKNOWN_CONSULTANT;
	
	for (int i=0; i<peformedBy.getMos().getCodeMappings().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) peformedBy.getMos().getCodeMappings().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.NAT_CONS_CODE.getId())
			return map.getTaxonomyCode();
	}

	return UNKNOWN_CONSULTANT;
}
 
Example 36
Project: AvoinApotti   File: LookupTreeImpl.java   Source Code and License 5 votes vote down vote up
private void addMapping(PrivateInsuranceCompany company,String code,String system) throws DomainInterfaceException
{
	if(code!=null&&system!=null)
	{
			DomainFactory factory = getDomainFactory();
			TaxonomyMap taxonomyMap = new TaxonomyMap();
			taxonomyMap.setTaxonomyCode(code);
			taxonomyMap.setTaxonomyName(getInstance(factory.getLookup(TaxonomyType.TYPE_ID), system));
			if(!company.getCodeMappings().contains(taxonomyMap))
				company.getCodeMappings().add(taxonomyMap);
	}
}
 
Example 37
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 5 votes vote down vote up
private Object getProcedureCode(Integer id_Procedure) 
{
	//returns ICD10 code of procedure.mappings
	
	StringBuffer out = new StringBuffer();
	out.append("");
	
	if(id_Procedure == null)
		return null;
	
	Procedure doProc = (Procedure)domFactory.getDomainObject(Procedure.class, id_Procedure);
			
	List procTaxonomyMapColl = doProc.getTaxonomyMap();
	if(procTaxonomyMapColl != null && procTaxonomyMapColl.size() > 0)
	{
		for(int i=0; i<procTaxonomyMapColl.size(); i++)
		{
			TaxonomyMap doTavonomyMap = (TaxonomyMap)procTaxonomyMapColl.get(i);
			if(doTavonomyMap != null && doTavonomyMap.getTaxonomyName()!=null && doTavonomyMap.getTaxonomyName().getId()==(ims.core.vo.lookups.TaxonomyType.ICD10.getID()))
			{
				return out.append(doTavonomyMap.getTaxonomyCode());
			}				
		}				
	}
	return out;		

}
 
Example 38
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 5 votes vote down vote up
private Object getExternalCodingGPCode(PatientShort patient) 
{
	if (!(patient!=null && patient.getID_PatientIsNotNull()))
		return "";
		
	DomainFactory factory = domFactory;
	// get GP Code based on patient surgery location
	Patient pt = (Patient)factory.getDomainObject(Patient.class, patient.getID_Patient());
	
	if (pt != null && pt.getGp() != null)
	{
		List lstcm = pt.getGp().getCodeMappings();
		if(lstcm != null && lstcm.size() > 0)
		{
			for(int i=0; i<lstcm.size(); i++)
			{
				TaxonomyMap doTavonomyMap = (TaxonomyMap)lstcm.get(i);
				if(doTavonomyMap != null && doTavonomyMap.getTaxonomyName()!=null && doTavonomyMap.getTaxonomyName().getId() == (ims.core.vo.lookups.TaxonomyType.NAT_GP_CODE.getID()))
				{
					return doTavonomyMap.getTaxonomyCode();
				}				
			}				
		}
		
	}
	
	return "";
}
 
Example 39
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 40
Project: openMAXIMS   File: BedAdmissionComponentImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;

	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}

	return null;
}
 
Example 41
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getFirstAttendanceValue(Activity activity, String defaultVal)
{
	if (activity == null || activity.getCodeMappings() == null)
		return defaultVal; 
	
	for (int i=0; i<activity.getCodeMappings().size(); i++)
	{
		TaxonomyMap domMap = (TaxonomyMap) activity.getCodeMappings().get(i);
		if (domMap.getTaxonomyName().getId() == TaxonomyType.CDS.getID())
			return domMap.getTaxonomyCode();
	}
	return defaultVal;
}
 
Example 42
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getPracticeCode(Organisation practice) 
{
  	    // Practice is parent of surgery
	if (practice != null && practice.getCodeMappings() != null)
	{
		for (int i=0; i<practice.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) practice.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return UNKNOWN_PRACTICE;
}
 
Example 43
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getGPCode(Gp gp, String defaultVal) 
{
	if (gp != null && gp.getCodeMappings() != null && gp.getCodeMappings().size() > 0)
	{
		for (int i=0; i<gp.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) gp.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_GP_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return defaultVal;
}
 
Example 44
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNationalLocCode(Location loc, String defaultSiteCode) 
{
	if (loc == null || loc.getCodeMappings() == null || loc.getCodeMappings().size() == 0)
		return defaultSiteCode;
	
	for (int i=0; i<loc.getCodeMappings().size(); i++)
	{
		TaxonomyMap mp = (TaxonomyMap) loc.getCodeMappings().get(i);
		if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
			return mp.getTaxonomyCode();
	}
	
	return defaultSiteCode;
}
 
Example 45
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getICDCode(Diagnosis primaryDiagnosis) 
{
	for (int i=0; i<primaryDiagnosis.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) primaryDiagnosis.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.ICD10.getId())
			return map.getTaxonomyCode();
	}
		
	return null;
}
 
Example 46
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNatConsultantCode(Hcp peformedBy) 
{
	if (peformedBy == null)
		return UNKNOWN_CONSULTANT;
	
	for (int i=0; i<peformedBy.getMos().getCodeMappings().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) peformedBy.getMos().getCodeMappings().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.NAT_CONS_CODE.getId())
			return map.getTaxonomyCode();
	}

	return UNKNOWN_CONSULTANT;
}
 
Example 47
Project: openMAXIMS   File: LookupTreeImpl.java   Source Code and License 5 votes vote down vote up
private void addMapping(PrivateInsuranceCompany company,String code,String system) throws DomainInterfaceException
{
	if(code!=null&&system!=null)
	{
			DomainFactory factory = getDomainFactory();
			TaxonomyMap taxonomyMap = new TaxonomyMap();
			taxonomyMap.setTaxonomyCode(code);
			taxonomyMap.setTaxonomyName(getInstance(factory.getLookup(TaxonomyType.TYPE_ID), system));
			if(!company.getCodeMappings().contains(taxonomyMap))
				company.getCodeMappings().add(taxonomyMap);
	}
}
 
Example 48
Project: openMAXIMS   File: HL7PathwayIfImpl.java   Source Code and License 5 votes vote down vote up
private boolean targetHasSamePASMapping(PatientJourneyTarget domPjt, String eventTargetPASMappingValue)
{
	for (int i=0;domPjt.getPathwayTarget()!=null && domPjt.getPathwayTarget().getTarget()!=null && domPjt.getPathwayTarget().getTarget().getTaxonomyMaps()!=null && i<domPjt.getPathwayTarget().getTarget().getTaxonomyMaps().size(); i++)
	{
		TaxonomyMap taxMap = (TaxonomyMap)domPjt.getPathwayTarget().getTarget().getTaxonomyMaps().get(i);
		if (taxMap!=null && TaxonomyType.PAS.getID()==taxMap.getTaxonomyName().getId() && taxMap.getTaxonomyCode().equals(eventTargetPASMappingValue.toString()))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 49
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 50
Project: openMAXIMS   File: BedAdmissionComponentImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 51
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getFirstAttendanceValue(Activity activity, String defaultVal)
{
	if (activity == null || activity.getCodeMappings() == null)
		return defaultVal; 
	
	for (int i=0; i<activity.getCodeMappings().size(); i++)
	{
		TaxonomyMap domMap = (TaxonomyMap) activity.getCodeMappings().get(i);
		if (domMap.getTaxonomyName().getId() == TaxonomyType.CDS.getID())
			return domMap.getTaxonomyCode();
	}
	return defaultVal;
}
 
Example 52
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getPracticeCode(Organisation practice) 
{
  	    // Practice is parent of surgery
	if (practice != null && practice.getCodeMappings() != null)
	{
		for (int i=0; i<practice.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) practice.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return UNKNOWN_PRACTICE;
}
 
Example 53
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getGPCode(Gp gp, String defaultVal) 
{
	if (gp != null && gp.getCodeMappings() != null && gp.getCodeMappings().size() > 0)
	{
		for (int i=0; i<gp.getCodeMappings().size(); i++)
		{
			TaxonomyMap mp = (TaxonomyMap) gp.getCodeMappings().get(i);
			if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_GP_CODE.getId())
				return mp.getTaxonomyCode();
		}
	}
	return defaultVal;
}
 
Example 54
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNationalLocCode(Location loc, String defaultSiteCode) 
{
	if (loc == null || loc.getCodeMappings() == null || loc.getCodeMappings().size() == 0)
		return defaultSiteCode;
	
	for (int i=0; i<loc.getCodeMappings().size(); i++)
	{
		TaxonomyMap mp = (TaxonomyMap) loc.getCodeMappings().get(i);
		if (mp.getTaxonomyName().getId() == TaxonomyType.NAT_LOC_CODE.getId())
			return mp.getTaxonomyCode();
	}
	
	return defaultSiteCode;
}
 
Example 55
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getICDCode(Diagnosis primaryDiagnosis) 
{
	for (int i=0; i<primaryDiagnosis.getTaxonomyMap().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) primaryDiagnosis.getTaxonomyMap().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.ICD10.getId())
			return map.getTaxonomyCode();
	}
		
	return null;
}
 
Example 56
Project: openMAXIMS   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getNatConsultantCode(Hcp peformedBy) 
{
	if (peformedBy == null)
		return UNKNOWN_CONSULTANT;
	
	for (int i=0; i<peformedBy.getMos().getCodeMappings().size(); i++)
	{
		TaxonomyMap map = (TaxonomyMap) peformedBy.getMos().getCodeMappings().get(i);
		if (map.getTaxonomyName().getId() == TaxonomyType.NAT_CONS_CODE.getId())
			return map.getTaxonomyCode();
	}

	return UNKNOWN_CONSULTANT;
}
 
Example 57
Project: openMAXIMS   File: LookupTreeImpl.java   Source Code and License 5 votes vote down vote up
private void addMapping(PrivateInsuranceCompany company,String code,String system) throws DomainInterfaceException
{
	if(code!=null&&system!=null)
	{
			DomainFactory factory = getDomainFactory();
			TaxonomyMap taxonomyMap = new TaxonomyMap();
			taxonomyMap.setTaxonomyCode(code);
			taxonomyMap.setTaxonomyName(getInstance(factory.getLookup(TaxonomyType.TYPE_ID), system));
			if(!company.getCodeMappings().contains(taxonomyMap))
				company.getCodeMappings().add(taxonomyMap);
	}
}
 
Example 58
Project: openmaxims-linux   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 59
Project: openmaxims-linux   File: BedAdmissionComponentImpl.java   Source Code and License 5 votes vote down vote up
private String getPasMapping(Medic consultant) 
{
	if(consultant == null || consultant.getMos() == null || consultant.getMos().getCodeMappings() == null || consultant.getMos().getCodeMappings().size() == 0)
		return null;
	
	Iterator it = consultant.getMos().getCodeMappings().iterator();
	while(it.hasNext())
	{
		TaxonomyMap map = (TaxonomyMap) it.next();
		if(map.getTaxonomyName().equals(getDomLookup(TaxonomyType.PAS)))
			return map.getTaxonomyCode();
	}
	
	return null;
}
 
Example 60
Project: openmaxims-linux   File: CDSGenerateImpl.java   Source Code and License 5 votes vote down vote up
private String getFirstAttendanceValue(Activity activity, String defaultVal)
{
	if (activity == null || activity.getCodeMappings() == null)
		return defaultVal; 
	
	for (int i=0; i<activity.getCodeMappings().size(); i++)
	{
		TaxonomyMap domMap = (TaxonomyMap) activity.getCodeMappings().get(i);
		if (domMap.getTaxonomyName().getId() == TaxonomyType.CDS.getID())
			return domMap.getTaxonomyCode();
	}
	return defaultVal;
}