Java Code Examples for ims.core.vo.LocShortMappingsVoCollection

The following are top voted examples for showing how to use ims.core.vo.LocShortMappingsVoCollection. 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 populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitalListCombo()
{
	LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
	if (voLocShortMapColl != null)
	{
		int currentLocName;
		for (int i = 0; i < voLocShortMapColl.size(); i++)
		{
			LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
			form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

			if (engine.getCurrentLocation() != null)
			{
				currentLocName = engine.getCurrentLocation().getID();
				if (currentLocName == voLocShortMap.getID())
				{
					form.cmbHospital().setValue(voLocShortMap);
				}
			}
		}
		onCmbHospitalFilterValueChanged();
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbDestWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if (wards != null)
	{
		for (int i = 0; i < wards.size(); i++) 
		{
			form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
		}

		if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
		{
			form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}

		else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
		{
			form.ctnDetails().qmbDestWard().showOpened();
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if(wards != null)
	{
		for (int i = 0; i < wards.size(); i++)
		{
			form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
		}
	
		if(form.ctnDetails().qmbWard().getValues().size() == 1)
		{
			form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}
	
		else if(form.ctnDetails().qmbWard().getValues().size() > 1)
		{
			form.ctnDetails().qmbWard().showOpened();
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 6
Project: AvoinApotti   File: PendingDischargesImpl.java   View source code 6 votes vote down vote up
public LocationLiteVoCollection getWards(Integer hospital) 
{
	DomainFactory factory = getDomainFactory();
	OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocationRefVo loc=new LocationRefVo();
	loc.setID_Location(hospital);
	LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
	LocationLiteVoCollection locations=new LocationLiteVoCollection();

	if (wards.size()>0)
	{
		for (int i=0;i<wards.size();i++)
		{
			LocationLiteVo location=new LocationLiteVo();
			location=wards.get(i);
			locations.add(location);
		}
		
	}
	return locations;
	
}
 
Example 7
Project: AvoinApotti   File: InpatientListImpl.java   View source code 6 votes vote down vote up
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
	String strListLocalCodes = "";
	OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);
	
	if (voLocShortColl != null && voLocShortColl.size() > 0)
	{
		String delim = "|";
		
		for(int i=0; i<voLocShortColl.size(); i++)
		{
			LocShortMappingsVo voLocShort = voLocShortColl.get(i);
			strListLocalCodes += voLocShort.getPasMapping();
			if(voLocShortColl.size() - i == 2)
				strListLocalCodes += delim;
		}
	}
	return strListLocalCodes;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationCombo()
{
	form.cmbLocation().clear();

	if (form.cmbHospital().getValue() == null)
		return;

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());

		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitals()
{
	LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

	ILocation defaultLoc = domain.getCurrentLocation();
	LocationLiteVo hospital  = null;//	WDEV-14957
	
	if(defaultLoc != null)//	WDEV-14957
	{
		hospital = domain.getHospitalForCurrentLocation(defaultLoc);
	}

	for (int i = 0; i < coll.size(); i++)
	{
		form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
	}
	
	form.cmbHospital().setValue(hospital);//	WDEV-14957
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadHospitalCombo()
{
	LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();
	
	if (voCollHospitals != null)
	{
		for (int i = 0; i < voCollHospitals.size(); i++)
		{
			form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
		}
	}
	
	LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
	form.cmbHospital().setValue(currentHospital);
	
	hospitalValueChanged();
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();
	
	LocShortMappingsVoCollection activeWards = null;
	activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
	if (activeWards != null)
	{
		for (int i = 0; i < activeWards.size(); i++)
		{
			LocShortMappingsVo activeWard = activeWards.get(i);
			form.cmbWard().newRow(activeWard, activeWard.getName());
		}
	}
	
	if (form.getLocalContext().getPasEventLocationIsNotNull())
	{
		LocMostVo location = form.getLocalContext().getPasEventLocation();
		
		if (location != null && LocationType.WARD.equals(location.getType()))
			form.cmbWard().setValue(location);
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitalListCombo()
{
	LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
	if (voLocShortMapColl != null)
	{
		int currentLocName;
		for (int i = 0; i < voLocShortMapColl.size(); i++)
		{
			LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
			form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

			if (engine.getCurrentLocation() != null)
			{
				currentLocName = engine.getCurrentLocation().getID();
				if (currentLocName == voLocShortMap.getID())
				{
					form.cmbHospital().setValue(voLocShortMap);
				}
			}
		}
		onCmbHospitalFilterValueChanged();
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if(wards != null)
	{
		for (int i = 0; i < wards.size(); i++)
		{
			form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
		}
	
		if(form.ctnDetails().qmbWard().getValues().size() == 1)
		{
			form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}
	
		else if(form.ctnDetails().qmbWard().getValues().size() > 1)
		{
			form.ctnDetails().qmbWard().showOpened();
		}
	}
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}
	
	ILocation currentLocation = engine.getCurrentLocation();
	LocationLiteVo currentWard = domain.getWard((LocationRefVo) currentLocation);
	if (currentWard != null && LocationType.WARD.equals(currentWard.getType()))			// Check ward LocationType because the function "domain.getWard" will return any location passed as argument
	{																					// Whoever named & coded that function was a "GENIUS"
		form.cmbWard().setValue(currentWard);
	}
}
 
Example 17
Project: openMAXIMS   File: PendingDischargesImpl.java   View source code 6 votes vote down vote up
public LocationLiteVoCollection getWards(Integer hospital) 
{
	DomainFactory factory = getDomainFactory();
	OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocationRefVo loc=new LocationRefVo();
	loc.setID_Location(hospital);
	LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
	LocationLiteVoCollection locations=new LocationLiteVoCollection();

	if (wards.size()>0)
	{
		for (int i=0;i<wards.size();i++)
		{
			LocationLiteVo location=new LocationLiteVo();
			location=wards.get(i);
			locations.add(location);
		}
		
	}
	return locations;
	
}
 
Example 18
Project: openMAXIMS   File: InpatientListImpl.java   View source code 6 votes vote down vote up
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
	String strListLocalCodes = "";
	OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);
	
	if (voLocShortColl != null && voLocShortColl.size() > 0)
	{
		String delim = "|";
		
		for(int i=0; i<voLocShortColl.size(); i++)
		{
			LocShortMappingsVo voLocShort = voLocShortColl.get(i);
			strListLocalCodes += voLocShort.getPasMapping();
			if(voLocShortColl.size() - i == 2)
				strListLocalCodes += delim;
		}
	}
	return strListLocalCodes;
}
 
Example 19
Project: openMAXIMS   File: InpatientListImpl.java   View source code 6 votes vote down vote up
private String getWardIds(LocShortMappingsVoCollection wards)
{
	if (wards == null || wards.size() == 0)
		return "";
	
	StringBuilder idList = new StringBuilder();
	idList.append("(");
	for (int i=0; i<wards.size();i++)
	{
		if (wards.get(i) == null)
			continue;
		idList.append(wards.get(i).getID_Location().toString()).append(i == wards.size() - 1 ? ")": ", ");			
	}
	
	return idList.toString();
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationCombo()
{
	form.cmbLocation().clear();

	if (form.cmbHospital().getValue() == null)
		return;

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveLocationsForHospital(form.cmbHospital().getValue());

		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationCombo()
{
	form.cmbLocation().clear();

	if (form.cmbHospital().getValue() == null)
		return;

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveLocationsForHospital(form.cmbHospital().getValue());

		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitals()
{
	LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

	ILocation defaultLoc = domain.getCurrentLocation();
	LocationLiteVo hospital  = null;//	WDEV-14957
	
	if(defaultLoc != null)//	WDEV-14957
	{
		hospital = domain.getHospitalForCurrentLocation(defaultLoc);
	}

	for (int i = 0; i < coll.size(); i++)
	{
		form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
	}
	
	form.cmbHospital().setValue(hospital);//	WDEV-14957
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadHospitalCombo()
{
	LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();
	
	if (voCollHospitals != null)
	{
		for (int i = 0; i < voCollHospitals.size(); i++)
		{
			form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
		}
	}
	
	LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
	form.cmbHospital().setValue(currentHospital);
	
	hospitalValueChanged();
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();
	
	LocShortMappingsVoCollection activeWards = null;
	activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
	if (activeWards != null)
	{
		for (int i = 0; i < activeWards.size(); i++)
		{
			LocShortMappingsVo activeWard = activeWards.get(i);
			form.cmbWard().newRow(activeWard, activeWard.getName());
		}
	}
	
	if (form.getLocalContext().getPasEventLocationIsNotNull())
	{
		LocMostVo location = form.getLocalContext().getPasEventLocation();
		
		if (location != null && LocationType.WARD.equals(location.getType()))
			form.cmbWard().setValue(location);
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitalListCombo()
{
	LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
	if (voLocShortMapColl != null)
	{
		int currentLocName;
		for (int i = 0; i < voLocShortMapColl.size(); i++)
		{
			LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
			form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

			if (engine.getCurrentLocation() != null)
			{
				currentLocName = engine.getCurrentLocation().getID();
				if (currentLocName == voLocShortMap.getID())
				{
					form.cmbHospital().setValue(voLocShortMap);
				}
			}
		}
		onCmbHospitalFilterValueChanged();
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbDestWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if (wards != null)
	{
		for (int i = 0; i < wards.size(); i++) 
		{
			form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
		}

		if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
		{
			form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}

		else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
		{
			form.ctnDetails().qmbDestWard().showOpened();
		}
	}
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitals()
{
	LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

	ILocation defaultLoc = domain.getCurrentLocation();
	LocationLiteVo hospital  = null;//	WDEV-14957
	
	if(defaultLoc != null)//	WDEV-14957
	{
		hospital = domain.getHospitalForCurrentLocation(defaultLoc);
	}

	for (int i = 0; i < coll.size(); i++)
	{
		form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
	}
	
	form.cmbHospital().setValue(hospital);//	WDEV-14957
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 30
Project: openMAXIMS   File: PendingDischargesImpl.java   View source code 6 votes vote down vote up
public LocationLiteVoCollection getWards(Integer hospital) 
{
	DomainFactory factory = getDomainFactory();
	OrganisationAndLocation impl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocationRefVo loc=new LocationRefVo();
	loc.setID_Location(hospital);
	LocShortMappingsVoCollection wards = impl.listActiveWardsForHospital(loc);
	LocationLiteVoCollection locations=new LocationLiteVoCollection();

	if (wards.size()>0)
	{
		for (int i=0;i<wards.size();i++)
		{
			LocationLiteVo location=new LocationLiteVo();
			location=wards.get(i);
			locations.add(location);
		}
		
	}
	return locations;
	
}
 
Example 31
Project: openMAXIMS   File: InpatientListImpl.java   View source code 6 votes vote down vote up
/**
* list all Wards for the supplied Hospital. For each Ward retrieved get the PAS Mapping. Return a delimiter string of Ward Mappings 
*/
private String listWardMappingsForHospital(LocationRefVo hospital)
{
	String strListLocalCodes = "";
	OrganisationAndLocation locImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
	LocShortMappingsVoCollection voLocShortColl = locImpl.listActiveWardsForHospital(hospital);
	
	if (voLocShortColl != null && voLocShortColl.size() > 0)
	{
		String delim = "|";
		
		for(int i=0; i<voLocShortColl.size(); i++)
		{
			LocShortMappingsVo voLocShort = voLocShortColl.get(i);
			strListLocalCodes += voLocShort.getPasMapping();
			if(voLocShortColl.size() - i == 2)
				strListLocalCodes += delim;
		}
	}
	return strListLocalCodes;
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitals()
{
	LocShortMappingsVoCollection coll = domain.listActiveTreatingHospitals();

	ILocation defaultLoc = domain.getCurrentLocation();
	LocationLiteVo hospital  = null;//	WDEV-14957
	
	if(defaultLoc != null)//	WDEV-14957
	{
		hospital = domain.getHospitalForCurrentLocation(defaultLoc);
	}

	for (int i = 0; i < coll.size(); i++)
	{
		form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
	}
	
	form.cmbHospital().setValue(hospital);//	WDEV-14957
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadHospitalCombo()
{
	LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();
	
	if (voCollHospitals != null)
	{
		for (int i = 0; i < voCollHospitals.size(); i++)
		{
			form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
		}
	}
	
	LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
	form.cmbHospital().setValue(currentHospital);
	
	hospitalValueChanged();
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();
	
	LocShortMappingsVoCollection activeWards = null;
	activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
	if (activeWards != null)
	{
		for (int i = 0; i < activeWards.size(); i++)
		{
			LocShortMappingsVo activeWard = activeWards.get(i);
			form.cmbWard().newRow(activeWard, activeWard.getName());
		}
	}
	
	if (form.getLocalContext().getPasEventLocationIsNotNull())
	{
		LocMostVo location = form.getLocalContext().getPasEventLocation();
		
		if (location != null && LocationType.WARD.equals(location.getType()))
			form.cmbWard().setValue(location);
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.getGlobalContext().Core.getHospitalLoc());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void loadHospitalCombo()
{
	LocShortMappingsVoCollection voCollHospitals = domain.listActiveHospitals();
	
	if (voCollHospitals != null)
	{
		for (int i = 0; i < voCollHospitals.size(); i++)
		{
			form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).toString());
		}
	}
	
	LocationLiteVo currentHospital = domain.getCurrentHospital(engine.getCurrentLocation());
	form.cmbHospital().setValue(currentHospital);
	
	hospitalValueChanged();
}
 
Example 37
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
	{
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}
}
 
Example 38
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateHospitalListCombo()
{
	LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveHospitals();
	if (voLocShortMapColl != null)
	{
		int currentLocName;
		for (int i = 0; i < voLocShortMapColl.size(); i++)
		{
			LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
			form.cmbHospital().newRow(voLocShortMap, voLocShortMap.getName());

			if (engine.getCurrentLocation() != null)
			{
				currentLocName = engine.getCurrentLocation().getID();
				if (currentLocName == voLocShortMap.getID())
				{
					form.cmbHospital().setValue(voLocShortMap);
				}
			}
		}
		onCmbHospitalFilterValueChanged();
	}
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbDestWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbDestWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if (wards != null)
	{
		for (int i = 0; i < wards.size(); i++) 
		{
			form.ctnDetails().qmbDestWard().newRow(wards.get(i), wards.get(i).getName());
		}

		if (form.ctnDetails().qmbDestWard().getValues().size() == 1) 
		{
			form.ctnDetails().qmbDestWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}

		else if (form.ctnDetails().qmbDestWard().getValues().size() > 1) 
		{
			form.ctnDetails().qmbDestWard().showOpened();
		}
	}
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbWardTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbWard().clear();
	LocShortMappingsVoCollection wards = domain.listWards(value);
	
	if(wards != null)
	{
		for (int i = 0; i < wards.size(); i++)
		{
			form.ctnDetails().qmbWard().newRow(wards.get(i), wards.get(i).getName());
		}
	
		if(form.ctnDetails().qmbWard().getValues().size() == 1)
		{
			form.ctnDetails().qmbWard().setValue( (LocShortMappingsVo) form.ctnDetails().qmbWard().getValues().get(0));
		}
	
		else if(form.ctnDetails().qmbWard().getValues().size() > 1)
		{
			form.ctnDetails().qmbWard().showOpened();
		}
	}
}