Java Code Examples for ims.core.vo.LocSiteShortVo

The following are top voted examples for showing how to use ims.core.vo.LocSiteShortVo. 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   Source Code and License 6 votes vote down vote up
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
	if (voGP != null)
	{
		form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
		if (voPractice != null)
		{
			if (voPractice.getAddressIsNotNull())
			{
				if (voPractice.getAddress().getLine1IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
				if (voPractice.getAddress().getLine2IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
				if (voPractice.getAddress().getLine3IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
				if (voPractice.getAddress().getLine4IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
				if (voPractice.getAddress().getLine5IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
			}
			form.getLocalContext().setReferrerGP(voGP);
			form.getLocalContext().setReferrerPractice(voPractice);
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
	if (gpShortVo == null || locSiteShortVo == null)
		return;
	RecipientVo gpRecipVo = new RecipientVo();

	GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
	GpShortVo voGP = (GpShortVo) gpShortVo;

	PersonAddress surgeryAddress = null;

	if (locSiteShortVo.getAddressIsNotNull())
	{
		surgeryAddress = locSiteShortVo.getAddress();
		row.setAddress(surgeryAddress.toDisplayString());
	}

	row.setGP(form.getImages().Admin.StaffBlue);
	gpRecipVo.setName(voGP.getName());
	gpRecipVo.setAddress(surgeryAddress);
	gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

	row.setValue(gpRecipVo);
	row.setAdressee(voGP.getName().toString());

}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
	if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
	{
		LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
		for (LocSiteShortVo surgery : surgeries)
		{
			if(surgery.getIsActiveIsNotNull() && 
					surgery.getIsActive().equals(Boolean.TRUE)&&
					surgery.getPasCode()!=null&&
					gMCCode!=null&&
					gMCCode.trim()!=null&&
					surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
			{
				surgeriesForGp.add(surgery);
			}
		}
		return surgeriesForGp;
	}
	return null;
}
 
Example 4
Project: AvoinApotti   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
	if (postCode == null)
		return null;

	DomainFactory factory = getDomainFactory();
	String hql = " from LocSite l where l.address.postCode = :postCode ";

	List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

	if (locList != null && locList.size() == 1)
	{
		return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
	}
	else if (locList != null && locList.size() > 1)
	{
		throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
	}
	return null;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectLocation(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
		{
			row.setcolSelection(true);
			return true;
		}
	}
	
	return false;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocations()
{
	form.cmbSite().clear();
	
	LocSiteShortVoCollection locations = domain.getLocations();
	if(locations != null)
	{
		locations.sort();			
		for(int x = 0; x < locations.size(); x++)
		{
			LocSiteShortVo location = locations.get(x);
			if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
				form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
		}
	}
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
	if (voGP != null)
	{
		form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
		if (voPractice != null)
		{
			if (voPractice.getAddressIsNotNull())
			{
				if (voPractice.getAddress().getLine1IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
				if (voPractice.getAddress().getLine2IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
				if (voPractice.getAddress().getLine3IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
				if (voPractice.getAddress().getLine4IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
				if (voPractice.getAddress().getLine5IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
			}
			form.getLocalContext().setReferrerGP(voGP);
			form.getLocalContext().setReferrerPractice(voPractice);
		}
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
	if (gpShortVo == null || locSiteShortVo == null)
		return;
	RecipientVo gpRecipVo = new RecipientVo();

	GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
	GpShortVo voGP = (GpShortVo) gpShortVo;

	PersonAddress surgeryAddress = null;

	if (locSiteShortVo.getAddressIsNotNull())
	{
		surgeryAddress = locSiteShortVo.getAddress();
		row.setAddress(surgeryAddress.toDisplayString());
	}

	row.setGP(form.getImages().Admin.StaffBlue);
	gpRecipVo.setName(voGP.getName());
	gpRecipVo.setAddress(surgeryAddress);
	gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

	row.setValue(gpRecipVo);
	row.setAdressee(voGP.getName().toString());

}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries, String gMCCode)
{
	if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&& surgeries != null)
	{
		LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
		for (LocSiteShortVo surgery : surgeries)
		{
			if(surgery.getIsActiveIsNotNull() && 
					surgery.getIsActive().equals(Boolean.TRUE)&&
					surgery.getPasCode()!=null&&
					gMCCode!=null&&
					gMCCode.trim()!=null&&
					surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
			{
				surgeriesForGp.add(surgery);
			}
		}
		return surgeriesForGp;
	}
	return null;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private String buildSurgeryDisplayData(LocSiteShortVo surgery, boolean showLabels)
{
	if (surgery == null)
		return "";	
	String displayData = "";

	if (showLabels)
	{	
		displayData =  "Surgery: " + surgery.getName().toString() + (surgery.getAddressIsNotNull() && surgery.getAddress().toDisplayString() != null && surgery.getAddress().toDisplayString().length() > 0 ? "<br/>Address: " + surgery.getAddress().toDisplayString() : "");
	}
	else
	{
		displayData =  surgery.getName().toString() + (surgery.getAddressIsNotNull() && surgery.getAddress().toDisplayString() != null && surgery.getAddress().toDisplayString().length() > 0 ? "<br/>" + surgery.getAddress().toDisplayString() : "");
	}
	if (displayData.contains(",") && displayData.substring(displayData.lastIndexOf(",")+ 1, displayData.length()).trim().length() == 0)
	{		
		displayData = displayData.substring(0, displayData.lastIndexOf(","));
	}
	
	return displayData;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private ValueObject getSelectedValue()
{
	if (form.grdGps().getValue() != null)
		return (GpLiteVo) form.grdGps().getSelectedRow().getValue();
	
	if (form.dynGrdGps().getValue() != null && form.dynGrdGps().isVisible())
	{
		if (form.dynGrdGps().getValue() instanceof GpLiteVo)
			return (GpLiteVo) form.dynGrdGps().getValue();
		if (form.dynGrdGps().getValue() instanceof GpLiteToPracticeLiteVo)
			return (GpLiteToPracticeLiteVo) form.dynGrdGps().getValue();
		
		if (form.dynGrdGps().getValue() instanceof LocSiteShortVo)
			return ((LocSiteShortVo) form.dynGrdGps().getValue());
	}
	return null;
}
 
Example 12
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
	if (postCode == null)
		return null;

	DomainFactory factory = getDomainFactory();
	String hql = " from LocSite l where l.address.postCode = :postCode ";

	List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

	if (locList != null && locList.size() == 1)
	{
		return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
	}
	else if (locList != null && locList.size() > 1)
	{
		throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
	}
	return null;
}
 
Example 13
Project: openMAXIMS   File: GPSearchImpl.java   Source Code and License 6 votes vote down vote up
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries, String gMCCode)
{
	if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&& surgeries != null)
	{
		LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
		for (LocSiteShortVo surgery : surgeries)
		{
			if(surgery.getIsActiveIsNotNull() && 
					surgery.getIsActive().equals(Boolean.TRUE)&&
					surgery.getPasCode()!=null&&
					gMCCode!=null&&
					gMCCode.trim()!=null&&
					surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
			{
				surgeriesForGp.add(surgery);
			}
		}
		return surgeriesForGp;
	}
	return null;
	
}
 
Example 14
Project: openMAXIMS   File: GPSearchImpl.java   Source Code and License 6 votes vote down vote up
private boolean isSurgeryValidforAddress(GPSearchCriteriaVo filter, LocSiteShortVo surgery)
{
	if (surgery != null && filter.getAddressContains() != null && filter.getAddressContains().length() > 0)
	{			
		if (surgery.getIsActiveIsNotNull() && Boolean.TRUE.equals(surgery.getIsActive()) && ((surgery.getNameIsNotNull() && surgery.getName().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) || //WDEV-18828 
						(surgery.getAddressIsNotNull() &&
						(surgery.getAddress().getLine1IsNotNull() && surgery.getAddress().getLine1().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase()) ||
						(surgery.getAddress().getLine2IsNotNull()&& surgery.getAddress().getLine2().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
						(surgery.getAddress().getLine3IsNotNull()&& surgery.getAddress().getLine3().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) || 
						(surgery.getAddress().getLine4IsNotNull() && surgery.getAddress().getLine4().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
						(surgery.getAddress().getLine5IsNotNull() && surgery.getAddress().getLine5().toUpperCase().contains(filter.getAddressContains().replaceAll("%", "").toUpperCase())) ||
						(surgery.getAddress().getPostCodeIsNotNull() && surgery.getAddress().getPostCode().replace(" ", "").toUpperCase().equals(filter.getAddressContains().replaceAll("%", "").replace(" ", "").toUpperCase()))))))
		{
			return true;
		}
	}
	return false;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectLocation(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
		{
			row.setcolSelection(true);
			return true;
		}
	}
	
	return false;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocations()
{
	form.cmbSite().clear();
	
	LocSiteShortVoCollection locations = domain.getLocations();
	if(locations != null)
	{
		locations.sort();			
		for(int x = 0; x < locations.size(); x++)
		{
			LocSiteShortVo location = locations.get(x);
			if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
				form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
		}
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
	if (voGP != null)
	{
		form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
		if (voPractice != null)
		{
			if (voPractice.getAddressIsNotNull())
			{
				if (voPractice.getAddress().getLine1IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
				if (voPractice.getAddress().getLine2IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
				if (voPractice.getAddress().getLine3IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
				if (voPractice.getAddress().getLine4IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
				if (voPractice.getAddress().getLine5IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
			}
			form.getLocalContext().setReferrerGP(voGP);
			form.getLocalContext().setReferrerPractice(voPractice);
		}
	}
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
	if (gpShortVo == null || locSiteShortVo == null)
		return;
	RecipientVo gpRecipVo = new RecipientVo();

	GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
	GpShortVo voGP = (GpShortVo) gpShortVo;

	PersonAddress surgeryAddress = null;

	if (locSiteShortVo.getAddressIsNotNull())
	{
		surgeryAddress = locSiteShortVo.getAddress();
		row.setAddress(surgeryAddress.toDisplayString());
	}

	row.setGP(form.getImages().Admin.StaffBlue);
	gpRecipVo.setName(voGP.getName());
	gpRecipVo.setAddress(surgeryAddress);
	gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

	row.setValue(gpRecipVo);
	row.setAdressee(voGP.getName().toString());

}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
	if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
	{
		LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
		for (LocSiteShortVo surgery : surgeries)
		{
			if(surgery.getIsActiveIsNotNull() && 
					surgery.getIsActive().equals(Boolean.TRUE)&&
					surgery.getPasCode()!=null&&
					gMCCode!=null&&
					gMCCode.trim()!=null&&
					surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
			{
				surgeriesForGp.add(surgery);
			}
		}
		return surgeriesForGp;
	}
	return null;
}
 
Example 20
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
	if (postCode == null)
		return null;

	DomainFactory factory = getDomainFactory();
	String hql = " from LocSite l where l.address.postCode = :postCode ";

	List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

	if (locList != null && locList.size() == 1)
	{
		return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
	}
	else if (locList != null && locList.size() > 1)
	{
		throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
	}
	return null;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectLocation(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
		{
			row.setcolSelection(true);
			return true;
		}
	}
	
	return false;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocations()
{
	form.cmbSite().clear();
	
	LocSiteShortVoCollection locations = domain.getLocations();
	if(locations != null)
	{
		locations.sort();			
		for(int x = 0; x < locations.size(); x++)
		{
			LocSiteShortVo location = locations.get(x);
			if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
				form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
		}
	}
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
	if (voGP != null)
	{
		form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
		if (voPractice != null)
		{
			if (voPractice.getAddressIsNotNull())
			{
				if (voPractice.getAddress().getLine1IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
				if (voPractice.getAddress().getLine2IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
				if (voPractice.getAddress().getLine3IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
				if (voPractice.getAddress().getLine4IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
				if (voPractice.getAddress().getLine5IsNotNull())
					form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
			}
			form.getLocalContext().setReferrerGP(voGP);
			form.getLocalContext().setReferrerPractice(voPractice);
		}
	}
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo)
{
	if (gpShortVo == null || locSiteShortVo == null)
		return;
	RecipientVo gpRecipVo = new RecipientVo();

	GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow();
	GpShortVo voGP = (GpShortVo) gpShortVo;

	PersonAddress surgeryAddress = null;

	if (locSiteShortVo.getAddressIsNotNull())
	{
		surgeryAddress = locSiteShortVo.getAddress();
		row.setAddress(surgeryAddress.toDisplayString());
	}

	row.setGP(form.getImages().Admin.StaffBlue);
	gpRecipVo.setName(voGP.getName());
	gpRecipVo.setAddress(surgeryAddress);
	gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP);

	row.setValue(gpRecipVo);
	row.setAdressee(voGP.getName().toString());

}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private LocSiteShortVoCollection getHeartsSurgery(LocSiteShortVoCollection surgeries,String gMCCode)
{
	if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&surgeries!=null)
	{
		LocSiteShortVoCollection surgeriesForGp = new LocSiteShortVoCollection();
		for (LocSiteShortVo surgery : surgeries)
		{
			if(surgery.getIsActiveIsNotNull() && 
					surgery.getIsActive().equals(Boolean.TRUE)&&
					surgery.getPasCode()!=null&&
					gMCCode!=null&&
					gMCCode.trim()!=null&&
					surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
			{
				surgeriesForGp.add(surgery);
			}
		}
		return surgeriesForGp;
	}
	return null;
}
 
Example 26
Project: openmaxims-linux   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
public LocSiteShortVo getLocSiteByPostCode(String postCode) 
{
	if (postCode == null)
		return null;

	DomainFactory factory = getDomainFactory();
	String hql = " from LocSite l where l.address.postCode = :postCode ";

	List locList = factory.find(hql,new String[]{"postCode"}, new Object[]{postCode});

	if (locList != null && locList.size() == 1)
	{
		return LocSiteShortVoAssembler.create((LocSite) locList.get(0));
	}
	else if (locList != null && locList.size() > 1)
	{
		throw new DomainRuntimeException("Non unique hit on LocationSite by Post Code " + postCode);
	}
	return null;
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean selectLocation(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
		{
			row.setcolSelection(true);
			return true;
		}
	}
	
	return false;
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocations()
{
	form.cmbSite().clear();
	
	LocSiteShortVoCollection locations = domain.getLocations();
	if(locations != null)
	{
		locations.sort();			
		for(int x = 0; x < locations.size(); x++)
		{
			LocSiteShortVo location = locations.get(x);
			if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() != 0)
				form.cmbSite().newRow(location, location.getName(), form.getImages().Admin.LocationSite);
		}
	}
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void refreshGpDetails(GpShortVo gp, LocSiteShortVo gpSurgery)
{
	form.getGlobalContext().Core.setGPDetails(gp);
	form.getGlobalContext().Core.setGPSurgery(gpSurgery);
	form.imbGP().setTooltip(getGpTooltip(gp, gpSurgery));
	if (gpSurgery != null)
		form.txtGPPractice().setValue(gpSurgery.getName());
	if (gp != null)
		form.txtGPName().setValue(gp.getName().toString());
}
 
Example 30
Project: AvoinApotti   File: DemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getMappingForGpSurgery(LocSiteShortVo locSiteShortVo)
{
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
		return locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);

	return "";
}
 
Example 31
Project: AvoinApotti   File: EmergencyAttendanceDetailsCcImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 32
Project: AvoinApotti   File: AttendanceDetailsImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 33
Project: AvoinApotti   File: QuickRegistrationImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
	if (locRef == null)
		throw new CodingRuntimeException("Location not provided");

	DomainFactory factory = getDomainFactory();
	LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
}
 
Example 34
Project: AvoinApotti   File: VoMapper.java   Source Code and License 5 votes vote down vote up
private void populatePatientGPDetailsFromPD1(Patient patVo, PD1 pd1) throws HL7Exception
{
	// As there was an inconsistency between chapter 2 and 3 of the HL7 Specification for
	// PD1 and XON, we have to look for the practice code in the organisation name
	// component.
	String gpCode = pd1.getPatientPrimaryCareProviderNameIDNo(0).getIDNumber().getValue();
	if (gpCode != null)
		patVo.setGp(gpAdmin.getGPByTaxonomyType(gpCode, TaxonomyType.NAT_GP_CODE));
	//TODO: JME: 20060901: McKesson sending the practice code in the org name (1st) component
	//Should be in the ID (3rd) component. Temp fix here.
	String pracCode = pd1.getPatientPrimaryFacility(0).getOrganizationName().getValue();
	String surgeryCode=null;
	if (pd1.getPatientPrimaryFacility().length > 1)
		surgeryCode = pd1.getPatientPrimaryFacility(1).getIDNumber().getValue();
	if (surgeryCode == null)  // wdev-4457
		surgeryCode = pd1.getPatientPrimaryFacility(0).getIDNumber().getValue();

	if (pracCode != null)
	{
		if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&gpCode!=null&&gpCode!=Hl7Null) //
		{
			LocSiteShortVo surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + gpCode+"_"+surgeryCode, TaxonomyType.PAS);
			if(surgery==null)
			{
				surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS);
			}
			patVo.setGpSurgery(surgery);
		}
		else
		{
		patVo.setGpSurgery(orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS));
		}
	}
	
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * @param voCollMosOrgLoc
 * @param newNode
 */
private void showOrgForMos(MosOrgLocVoCollection voCollMosOrgLoc, TreeNode mosNode)
{
	mosNode.getNodes().clear();
	for (int i = 0; i < voCollMosOrgLoc.size(); i++)
	{
		MosOrgLocVo vo = voCollMosOrgLoc.get(i);
		TreeNode orgNode = mosNode.getNodes().add(vo.getOrganisation(), vo.getOrganisation().getName());
		orgNode.setCollapsedImage(form.getImages().Admin.Organisation);
		HCPLocationLiteVo.mixedSort(vo.getHCPLocations());
		for (int j = 0; j < vo.getHCPLocations().size(); j++)
		{
			HCPLocationLiteVo locVo = vo.getHCPLocations().get(j);

			StringBuffer sb = new StringBuffer();
			sb.append(locVo.getLocation().getName());
			sb.append(locVo.getAccreditationStatusIsNotNull() ? " ," + locVo.getAccreditationStatus().toString() : "");

			TreeNode locNode = orgNode.getNodes().add(locVo, sb.toString());
			if (j == 0)
				locNode.setExpanded(true);

			if (locVo.getLocation() instanceof LocSiteVo || locVo.getLocation() instanceof LocSiteShortVo)
			{
				locNode.setCollapsedImage(form.getImages().Admin.LocationSite);
				locNode.setExpandedImage(form.getImages().Admin.LocationSite);
			}
			else
			{
				locNode.setCollapsedImage(form.getImages().Admin.Location);
				locNode.setExpandedImage(form.getImages().Admin.Location);
			}
		}
	}

}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addLocationSite(LocSiteShortVo location)
{
	if(location == null)
		return;
	if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() == 0)
		return;
	
	GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().newRow();
	TemplateLocationShortVo templateLocation = new TemplateLocationShortVo();
	templateLocation.setLocation(location);
	templateLocation.setIsActive(Boolean.TRUE);		
	row.setcolImage(form.getImages().Admin.LocationSite);
	row.setcolName(location.getName());
	row.setValue(templateLocation);
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isSelected(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
			return row.getcolSelection();		
	}
	
	return false;
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean locationExists(TemplateLocationShortVoCollection templateLocations, LocSiteShortVo location)
{
	if(templateLocations == null || location == null)
		return false;
	
	for(int x = 0; x < templateLocations.size(); x++)
	{
		TemplateLocationShortVo item = templateLocations.get(x);
		if(item != null && item.getLocationIsNotNull() && item.getLocation().equals(location))
			return true;
	}
	
	return false;
}
 
Example 39
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License 5 votes vote down vote up
private LocSiteShortVo getHospital(Location doLocation)
{
	if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
		return LocSiteShortVoAssembler.create((LocSite) doLocation);

	while(doLocation.getParentLocation() != null)
	{
		doLocation = doLocation.getParentLocation();
		if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
			return LocSiteShortVoAssembler.create((LocSite) doLocation);
	}

	return null;
}
 
Example 40
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
	if (locRef == null)
		throw new CodingRuntimeException("Location not provided");

	DomainFactory factory = getDomainFactory();
	LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
}
 
Example 41
Project: openMAXIMS   File: DemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getGpMappingFromSurgery(LocSiteShortVo locSiteShortVo)
{
	String gpCode="";
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
	{
		String surgeryCode=locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);
		if(surgeryCode!=null)
		{
			int idx=surgeryCode.lastIndexOf('_');
			gpCode=surgeryCode.substring(idx+1);
		}
	}
	return gpCode;
}
 
Example 42
Project: openMAXIMS   File: DemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getMappingForGpSurgery(LocSiteShortVo locSiteShortVo)
{
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
		return locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);

	return "";
}
 
Example 43
Project: openMAXIMS   File: PDSDemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getGpMappingFromSurgery(LocSiteShortVo locSiteShortVo)
{
	String gpCode="";
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
	{
		String surgeryCode=locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);
		if(surgeryCode!=null)
		{
			int idx=surgeryCode.lastIndexOf('_');
			gpCode=surgeryCode.substring(idx+1);
		}
	}
	return gpCode;
}
 
Example 44
Project: openMAXIMS   File: PDSDemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getMappingForGpSurgery(LocSiteShortVo locSiteShortVo)
{
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
		return locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);

	return "";
}
 
Example 45
Project: openMAXIMS   File: EmergencyAttendanceDetailsCcImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 46
Project: openMAXIMS   File: AttendanceDetailsImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 47
Project: openMAXIMS   File: QuickRegistrationImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
	if (locRef == null)
		throw new CodingRuntimeException("Location not provided");

	DomainFactory factory = getDomainFactory();
	LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
}
 
Example 48
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSurgeriesFromCollection(GPLiteWithPracticesVo voGpWithPractice,	GpPracticeLiteVo gppractice, DynamicGridRow row, LocSiteShortVoCollection surgeries)
{
	for (LocSiteShortVo surgery : surgeries)
	{	
		if (surgery == null || (surgery != null && !(Boolean.TRUE.equals(surgery.getIsActive()))))
			continue;	
		
		addSurgeryRow(voGpWithPractice, gppractice, row, surgery);
		
		row = null;
	}
}
 
Example 49
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * @param voCollMosOrgLoc
 * @param newNode
 */
private void showOrgForMos(MosOrgLocVoCollection voCollMosOrgLoc, TreeNode mosNode)
{
	mosNode.getNodes().clear();
	for (int i = 0; i < voCollMosOrgLoc.size(); i++)
	{
		MosOrgLocVo vo = voCollMosOrgLoc.get(i);
		TreeNode orgNode = mosNode.getNodes().add(vo.getOrganisation(), vo.getOrganisation().getName());
		orgNode.setCollapsedImage(form.getImages().Admin.Organisation);
		HCPLocationLiteVo.mixedSort(vo.getHCPLocations());
		for (int j = 0; j < vo.getHCPLocations().size(); j++)
		{
			HCPLocationLiteVo locVo = vo.getHCPLocations().get(j);

			StringBuffer sb = new StringBuffer();
			sb.append(locVo.getLocation().getName());
			sb.append(locVo.getAccreditationStatusIsNotNull() ? " ," + locVo.getAccreditationStatus().toString() : "");

			TreeNode locNode = orgNode.getNodes().add(locVo, sb.toString());
			if (j == 0)
				locNode.setExpanded(true);

			if (locVo.getLocation() instanceof LocSiteVo || locVo.getLocation() instanceof LocSiteShortVo)
			{
				locNode.setCollapsedImage(form.getImages().Admin.LocationSite);
				locNode.setExpandedImage(form.getImages().Admin.LocationSite);
			}
			else
			{
				locNode.setCollapsedImage(form.getImages().Admin.Location);
				locNode.setExpandedImage(form.getImages().Admin.Location);
			}
		}
	}

}
 
Example 50
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addLocationSite(LocSiteShortVo location)
{
	if(location == null)
		return;
	if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() == 0)
		return;
	
	GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().newRow();
	TemplateLocationShortVo templateLocation = new TemplateLocationShortVo();
	templateLocation.setLocation(location);
	templateLocation.setIsActive(Boolean.TRUE);		
	row.setcolImage(form.getImages().Admin.LocationSite);
	row.setcolName(location.getName());
	row.setValue(templateLocation);
}
 
Example 51
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isSelected(LocSiteShortVo location)
{
	if(location == null)
		return false;
	
	for(int x = 0; x < form.lyrDetails().tabLocations().grdLocations().getRows().size(); x++)
	{
		GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().get(x);
		if(row.getValue() != null && row.getValue().getLocationIsNotNull() && row.getValue().getLocation().equals(location))
			return row.getcolSelection();		
	}
	
	return false;
}
 
Example 52
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean locationExists(TemplateLocationShortVoCollection templateLocations, LocSiteShortVo location)
{
	if(templateLocations == null || location == null)
		return false;
	
	for(int x = 0; x < templateLocations.size(); x++)
	{
		TemplateLocationShortVo item = templateLocations.get(x);
		if(item != null && item.getLocationIsNotNull() && item.getLocation().equals(location))
			return true;
	}
	
	return false;
}
 
Example 53
Project: openMAXIMS   File: MyOrderImpl.java   Source Code and License 5 votes vote down vote up
private LocSiteShortVo getHospital(Location doLocation)
{
	if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
		return LocSiteShortVoAssembler.create((LocSite) doLocation);

	while(doLocation.getParentLocation() != null)
	{
		doLocation = doLocation.getParentLocation();
		if(doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
			return LocSiteShortVoAssembler.create((LocSite) doLocation);
	}

	return null;
}
 
Example 54
Project: openMAXIMS   File: MyOrderImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
	if (locRef == null)
		throw new CodingRuntimeException("Location not provided");

	DomainFactory factory = getDomainFactory();
	LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
}
 
Example 55
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void refreshGpDetails(GpShortVo gp, LocSiteShortVo gpSurgery)
{
	form.getGlobalContext().Core.setGPDetails(gp);
	form.getGlobalContext().Core.setGPSurgery(gpSurgery);
	form.imbGP().setTooltip(getGpTooltip(gp, gpSurgery));
	if (gpSurgery != null)
		form.txtGPPractice().setValue(gpSurgery.getName());
	if (gp != null)
		form.txtGPName().setValue(gp.getName().toString());
}
 
Example 56
Project: openMAXIMS   File: DemographicsImpl.java   Source Code and License 5 votes vote down vote up
private String getMappingForGpSurgery(LocSiteShortVo locSiteShortVo)
{
	if(locSiteShortVo != null && locSiteShortVo.getCodeMappingsIsNotNull())
		return locSiteShortVo.getCodeMappings().getMappingValue(TaxonomyType.PAS);

	return "";
}
 
Example 57
Project: openMAXIMS   File: EmergencyAttendanceDetailsCcImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 58
Project: openMAXIMS   File: AttendanceDetailsImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef) 
{
	if(	locRef == null )
		throw new CodingRuntimeException("Location not provided");
	
	DomainFactory factory = getDomainFactory();
	LocSite doLocation  =(LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
	
}
 
Example 59
Project: openMAXIMS   File: QuickRegistrationImpl.java   Source Code and License 5 votes vote down vote up
public LocSiteShortVo getTypeOfLocSite(LocationRefVo locRef)
{
	if (locRef == null)
		throw new CodingRuntimeException("Location not provided");

	DomainFactory factory = getDomainFactory();
	LocSite doLocation = (LocSite) factory.getDomainObject(LocSite.class, locRef.getID_Location());
	return LocSiteShortVoAssembler.create(doLocation);
}
 
Example 60
Project: openMAXIMS   File: VoMapper.java   Source Code and License 5 votes vote down vote up
private void populatePatientGPDetailsFromPD1(Patient patVo, PD1 pd1) throws HL7Exception
{
	// As there was an inconsistency between chapter 2 and 3 of the HL7 Specification for
	// PD1 and XON, we have to look for the practice code in the organisation name
	// component.
	String gpCode = pd1.getPatientPrimaryCareProviderNameIDNo(0).getIDNumber().getValue();
	if (gpCode != null)
		patVo.setGp(gpAdmin.getGPByTaxonomyType(gpCode, TaxonomyType.NAT_GP_CODE));
	//TODO: JME: 20060901: McKesson sending the practice code in the org name (1st) component
	//Should be in the ID (3rd) component. Temp fix here.
	String pracCode = pd1.getPatientPrimaryFacility(0).getOrganizationName().getValue();
	String surgeryCode=null;
	if (pd1.getPatientPrimaryFacility().length > 1)
		surgeryCode = pd1.getPatientPrimaryFacility(1).getIDNumber().getValue();
	if (surgeryCode == null)  // wdev-4457
		surgeryCode = pd1.getPatientPrimaryFacility(0).getIDNumber().getValue();

	if (pracCode != null)
	{
		if(ConfigFlag.HL7.HEARTS_GP_MODEL.getValue()&&gpCode!=null&&gpCode!=Hl7Null) //
		{
			LocSiteShortVo surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + gpCode+"_"+surgeryCode, TaxonomyType.PAS);
			if(surgery==null)
			{
				surgery=orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS);
			}
			patVo.setGpSurgery(surgery);
		}
		else
		{
		patVo.setGpSurgery(orgLoc.getLocSiteShortByTaxonomyType(pracCode + "_" + surgeryCode, TaxonomyType.PAS));
		}
	}
	
}