Java Code Examples for ims.core.vo.OrganisationVoCollection

The following are top voted examples for showing how to use ims.core.vo.OrganisationVoCollection. 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
protected void onQmbHospitalTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.lyrSurgeryDetails().tabGenDet().qmbHospital().clear();
	
	OrganisationVo voOrg = new OrganisationVo();
	voOrg.setName(value);
		
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().newRow(voColl.get(i), voColl.get(i).getName());

		if (voColl.size() == 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().setValue(voColl.get(0));
		else if (voColl.size() > 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().showOpened();		
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateOrganisationTree() 
{	
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();		
	initializeGrid();
	new OrganisationLocationHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populatOrganisationLocationDynamicGrid(form.dyngrdOrganisationLocation(), voColl, true);
	
	fillAccreditationCombos();
	
	form.dyngrdOrganisationLocation().getRows().expandAll();	

	HcpLocationVoCollection voCollHcpLocations = null;
	MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
	if (mos != null)
	{
		voCollHcpLocations = mos.getLocations();	
		setHcpLocationsInGrid(voCollHcpLocations);
	}		
}
 
Example 3
Project: AvoinApotti   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
private void checkChildsForDuplicateTaxonoy(OrganisationVoCollection  childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
	if (childs == null || doMap==null)
		return;
	
	for (int i = 0 ; i < childs.size(); i++)
	{
		OrganisationVo orgVo = childs.get(i);
		Object doObj = doMap.get(orgVo);
		//If doObj is null it means that nothing changed in that record and hibernate didn't instantiated that record
		if (doObj instanceof Organisation)
		{
			String dupMessage = Keywords.checkDuplicateTaxonomy(factory,doObj, "codeMappings", orgVo.getCodeMappings(), "getName");
			if (dupMessage!=null)
				throw new UniqueKeyViolationException(dupMessage);
		}
	}
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onQmbHospitalTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.lyrSurgeryDetails().tabGenDet().qmbHospital().clear();
	
	OrganisationVo voOrg = new OrganisationVo();
	voOrg.setName(value);
		
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().newRow(voColl.get(i), voColl.get(i).getName());

		if (voColl.size() == 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().setValue(voColl.get(0));
		else if (voColl.size() > 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().showOpened();		
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateOrganisationTree() 
{	
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();		
	initializeGrid();
	new OrganisationLocationHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populatOrganisationLocationDynamicGrid(form.dyngrdOrganisationLocation(), voColl, true);
	
	fillAccreditationCombos();
	
	form.dyngrdOrganisationLocation().getRows().expandAll();	

	HcpLocationVoCollection voCollHcpLocations = null;
	MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
	if (mos != null)
	{
		voCollHcpLocations = mos.getLocations();	
		setHcpLocationsInGrid(voCollHcpLocations);
	}		
}
 
Example 6
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
private void checkChildsForDuplicateTaxonoy(OrganisationVoCollection  childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
	if (childs == null || doMap==null)
		return;
	
	for (int i = 0 ; i < childs.size(); i++)
	{
		OrganisationVo orgVo = childs.get(i);
		Object doObj = doMap.get(orgVo);
		//If doObj is null it means that nothing changed in that record and hibernate didn't instantiated that record
		if (doObj instanceof Organisation)
		{
			String dupMessage = Keywords.checkDuplicateTaxonomy(factory,doObj, "codeMappings", orgVo.getCodeMappings(), "getName");
			if (dupMessage!=null)
				throw new UniqueKeyViolationException(dupMessage);
		}
	}
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onQmbHospitalTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.lyrSurgeryDetails().tabGenDet().qmbHospital().clear();
	
	OrganisationVo voOrg = new OrganisationVo();
	voOrg.setName(value);
		
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().newRow(voColl.get(i), voColl.get(i).getName());

		if (voColl.size() == 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().setValue(voColl.get(0));
		else if (voColl.size() > 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().showOpened();		
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateOrganisationTree() 
{	
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();		
	initializeGrid();
	new OrganisationLocationHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populatOrganisationLocationDynamicGrid(form.dyngrdOrganisationLocation(), voColl, true);
	
	fillAccreditationCombos();
	
	form.dyngrdOrganisationLocation().getRows().expandAll();	

	HcpLocationVoCollection voCollHcpLocations = null;
	MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
	if (mos != null)
	{
		voCollHcpLocations = mos.getLocations();	
		setHcpLocationsInGrid(voCollHcpLocations);
	}		
}
 
Example 9
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
private void checkChildsForDuplicateTaxonoy(OrganisationVoCollection  childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
	if (childs == null || doMap==null)
		return;
	
	for (int i = 0 ; i < childs.size(); i++)
	{
		OrganisationVo orgVo = childs.get(i);
		Object doObj = doMap.get(orgVo);
		//If doObj is null it means that nothing changed in that record and hibernate didn't instantiated that record
		if (doObj instanceof Organisation)
		{
			String dupMessage = Keywords.checkDuplicateTaxonomy(factory,doObj, "codeMappings", orgVo.getCodeMappings(), "getName");
			if (dupMessage!=null)
				throw new UniqueKeyViolationException(dupMessage);
		}
	}
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onQmbHospitalTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.lyrSurgeryDetails().tabGenDet().qmbHospital().clear();
	
	OrganisationVo voOrg = new OrganisationVo();
	voOrg.setName(value);
		
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().newRow(voColl.get(i), voColl.get(i).getName());

		if (voColl.size() == 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().setValue(voColl.get(0));
		else if (voColl.size() > 1)
			form.lyrSurgeryDetails().tabGenDet().qmbHospital().showOpened();		
	}
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateOrganisationTree() 
{	
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();		
	initializeGrid();
	new OrganisationLocationHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populatOrganisationLocationDynamicGrid(form.dyngrdOrganisationLocation(), voColl, true);
	
	fillAccreditationCombos();
	
	form.dyngrdOrganisationLocation().getRows().expandAll();	

	HcpLocationVoCollection voCollHcpLocations = null;
	MemberOfStaffVo mos = form.getGlobalContext().Admin.getSelectedMos();
	if (mos != null)
	{
		voCollHcpLocations = mos.getLocations();	
		setHcpLocationsInGrid(voCollHcpLocations);
	}		
}
 
Example 12
Project: openmaxims-linux   File: OrganisationAndLocationImpl.java   Source Code and License 6 votes vote down vote up
private void checkChildsForDuplicateTaxonoy(OrganisationVoCollection  childs,Map<?, ?> doMap,DomainFactory factory) throws UniqueKeyViolationException
{
	if (childs == null || doMap==null)
		return;
	
	for (int i = 0 ; i < childs.size(); i++)
	{
		OrganisationVo orgVo = childs.get(i);
		Object doObj = doMap.get(orgVo);
		//If doObj is null it means that nothing changed in that record and hibernate didn't instantiated that record
		if (doObj instanceof Organisation)
		{
			String dupMessage = Keywords.checkDuplicateTaxonomy(factory,doObj, "codeMappings", orgVo.getCodeMappings(), "getName");
			if (dupMessage!=null)
				throw new UniqueKeyViolationException(dupMessage);
		}
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadOrganisations() 
{
	form.qmbReferringOrg().clear();
	
	OrganisationVoCollection voColl = domain.listOrganisation(new OrganisationVo());

	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.qmbReferringOrg().newRow(voColl.get(i), voColl.get(i).getName());
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateListControl()
{
	OrganisationVoCollection voColl = domain.listOrganisation(null);

	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl);
	form.treHeader().expandAll();
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{		
	form.btnSave().setEnabled(false);
	
	OrganisationVoCollection voColl = null;
	voColl = domain.listRootOrgsNoGpp();				
	new OrgTreeHelper(form.getImages().Admin.Organisation, null, form.getImages().Admin.LocationSite, null, form.getImages().Admin.Location, null).populateOrgTree(form.treOrganisationLocation(), voColl, false, false, false);

	form.treOrganisationLocation().expandAll();
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public void open() throws PresentationLogicException
{
	OrganisationVo voOrg = new OrganisationVo();
	clearInstanceControls();
	voOrg.setParentOrganisation(null);
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.LocationSite, form.getImages().Admin.Location, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl, false, false, true);
	form.treHeader().expandAll();
	form.setMode(FormMode.VIEW);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationTree()
{
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.lyrLHS().tabOrganisation().treOrganisation(), voColl);
	form.lyrLHS().tabOrganisation().treOrganisation().expandAll();
	// populateOrganisationTree(voColl);
}
 
Example 18
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = tree;
	this.dynGrid = null;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	
	populateOrganisations(voColl, null);		
}
 
Example 19
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = null;
	this.dynGrid = grid;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.dynGrid.getRows().clear();	
	
	populateOrganisations(voColl, null);
}
 
Example 20
Project: AvoinApotti   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive, boolean disableOrgNodes)
{
	this.tree = tree;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	populateOrgs(voColl, null, disableOrgNodes);		
}
 
Example 21
Project: AvoinApotti   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrgs(OrganisationVoCollection voColl, TreeNode parentNode, boolean disableOrgNodes)
{
	if (voColl == null)
		return;

	for (int i = 0; i < voColl.size(); i++)
	{
		OrganisationVo voOrg = voColl.get(i);
		if (voOrg.getIsActive().booleanValue() == false && !showInactive)
			continue;
		
		TreeNode orgNode = null;
		if (parentNode == null)
		{
			//WDEV-6444 - if node is inactive disable drag dropping for that node
			if(voOrg.getIsActive().booleanValue() == false)
				orgNode = tree.getNodes().add(voOrg, voOrg.getName());
			else
				orgNode = tree.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		}
		else
			orgNode = parentNode.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		Image img = voOrg.getIsActive().booleanValue() ? orgImg : orgDisImg;			
		orgNode.setCollapsedImage(img);
		orgNode.setExpandedImage(img);
		orgNode.setEnabled(!disableOrgNodes);
		
		populateOrgs(voOrg.getRelatedOrganisations().sort(), orgNode, disableOrgNodes);
		populateLocSites(voOrg.getLocationSites().sort(), orgNode);
	}
}
 
Example 22
Project: AvoinApotti   File: GPPracticeAdminImpl.java   Source Code and License 5 votes vote down vote up
public OrganisationVoCollection listPracticeParents(String value,
		Boolean activeOnly)
{
	if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
	{
		OrganisationAndLocation organisationAndLocation = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
		return organisationAndLocation.listPCTs(value, activeOnly);
	}
	// TODO Auto-generated method stub
	return null;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadOrganisations() 
{
	form.qmbReferringOrg().clear();
	
	OrganisationVoCollection voColl = domain.listOrganisation(new OrganisationVo());

	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.qmbReferringOrg().newRow(voColl.get(i), voColl.get(i).getName());
	}
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateListControl()
{
	OrganisationVoCollection voColl = domain.listOrganisation(null);

	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl, false, false);
	form.treHeader().expandAll();
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public void open() throws PresentationLogicException
{
	OrganisationVo voOrg = new OrganisationVo();
	clearInstanceControls();
	voOrg.setParentOrganisation(null);
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.LocationSite, form.getImages().Admin.Location, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl, false, false, false, true, false);
	form.treHeader().expandAll();
	form.setMode(FormMode.VIEW);
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationTree()
{
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.lyrLHS().tabOrganisation().treOrganisation(), voColl);
	form.lyrLHS().tabOrganisation().treOrganisation().expandAll();
	// populateOrganisationTree(voColl);
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationTree()
{
	OrganisationVoCollection voColl = null;
	voColl = domain.listRootOrgsNoGpp();	

	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.OrgDisabled, form.getImages().Admin.LocationSite, form.getImages().Admin.LocSiteDisabled, form.getImages().Admin.Location, form.getImages().Admin.LocDisabled).populateOrgTree(form.treOrgLoc(), voColl, false, !form.chkActiveOnly().getValue(), true, false, form.chkViewCaseNote().getValue()); //WDEV-19532
	form.treOrgLoc().expandAll();
	
	selectNodeInTree(); //WDEV-19677
	
}
 
Example 28
Project: openMAXIMS   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = tree;
	this.dynGrid = null;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	
	populateOrganisations(voColl, null);		
}
 
Example 29
Project: openMAXIMS   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = null;
	this.dynGrid = grid;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.dynGrid.getRows().clear();	
	
	populateOrganisations(voColl, null);
}
 
Example 30
Project: openMAXIMS   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive, boolean showVirtual, boolean disableOrgNodes, boolean caseNoteLocations)
{
	this.tree = tree;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.showCaseNoteLocations = caseNoteLocations;
	this.showVirtual = showVirtual;
	this.tree.clear();		
	populateOrgs(voColl, null, disableOrgNodes);		
}
 
Example 31
Project: openMAXIMS   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrgTreeCaseNoteLocations(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive, boolean showVirtual, boolean disableOrgNodes,  boolean showLocationsMarkedAsCaseNoteFolderOnly)
{
	this.tree = tree;
	this.showInactive = showInactive;
	this.showVirtual = showVirtual;
	this.showCheckBoxes = showCheckBoxes;
	this.showLocationsMarkedAsCaseNoteFolderOnly = showLocationsMarkedAsCaseNoteFolderOnly;
	this.tree.clear();		
	populateOrgs(voColl, null, disableOrgNodes);		
}
 
Example 32
Project: openMAXIMS   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrgs(OrganisationVoCollection voColl, TreeNode parentNode, boolean disableOrgNodes)
{
	if (voColl == null)
		return;

	for (int i = 0; i < voColl.size(); i++)
	{
		OrganisationVo voOrg = voColl.get(i);
		if (voOrg.getIsActive().booleanValue() == false && !showInactive)
			continue;
		
		TreeNode orgNode = null;
		if (parentNode == null)
		{
			//WDEV-6444 - if node is inactive disable drag dropping for that node
			if(voOrg.getIsActive().booleanValue() == false)
				orgNode = tree.getNodes().add(voOrg, voOrg.getName());
			else
				orgNode = tree.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		}
		else
			orgNode = parentNode.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		Image img = voOrg.getIsActive().booleanValue() ? orgImg : orgDisImg;			
		orgNode.setCollapsedImage(img);
		orgNode.setExpandedImage(img);
		orgNode.setEnabled(!disableOrgNodes);
		
		populateOrgs(voOrg.getRelatedOrganisations().sort(), orgNode, disableOrgNodes);
		populateLocSites(voOrg.getLocationSites().sort(), orgNode);
	}
}
 
Example 33
Project: openMAXIMS   File: GPPracticeAdminImpl.java   Source Code and License 5 votes vote down vote up
public OrganisationVoCollection listPracticeParents(String value,
		Boolean activeOnly)
{
	if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
	{
		OrganisationAndLocation organisationAndLocation = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
		return organisationAndLocation.listPCTs(value, activeOnly);
	}
	// TODO Auto-generated method stub
	return null;
}
 
Example 34
Project: openMAXIMS   File: OrganisationAndLocationImpl.java   Source Code and License 5 votes vote down vote up
/**
 * List Organisations
 */
public ims.core.vo.OrganisationVoCollection listOrganisation(ims.core.vo.OrganisationVo organisation, Boolean excludeGPs, Boolean activeOnly)
{
	List<?> orgs = listOrganisations(organisation, excludeGPs, activeOnly); //WDEV-20044
	OrganisationVoCollection voCollOrgs = OrganisationVoAssembler.createOrganisationVoCollectionFromOrganisation(orgs);
	
	return voCollOrgs;
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadOrganisations() 
{
	form.qmbReferringOrg().clear();
	
	OrganisationVoCollection voColl = domain.listOrganisation(new OrganisationVo());

	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.qmbReferringOrg().newRow(voColl.get(i), voColl.get(i).getName());
	}
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateListControl()
{
	OrganisationVoCollection voColl = domain.listOrganisation(null);

	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl);
	form.treHeader().expandAll();
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{		
	form.btnSave().setEnabled(false);
	
	OrganisationVoCollection voColl = null;
	voColl = domain.listRootOrgsNoGpp();				
	new OrgTreeHelper(form.getImages().Admin.Organisation, null, form.getImages().Admin.LocationSite, null, form.getImages().Admin.Location, null).populateOrgTree(form.treOrganisationLocation(), voColl, false, false, false);

	form.treOrganisationLocation().expandAll();
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public void open() throws PresentationLogicException
{
	OrganisationVo voOrg = new OrganisationVo();
	clearInstanceControls();
	voOrg.setParentOrganisation(null);
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.LocationSite, form.getImages().Admin.Location, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl, false, false, true);
	form.treHeader().expandAll();
	form.setMode(FormMode.VIEW);
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationTree()
{
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.lyrLHS().tabOrganisation().treOrganisation(), voColl);
	form.lyrLHS().tabOrganisation().treOrganisation().expandAll();
	// populateOrganisationTree(voColl);
}
 
Example 40
Project: openMAXIMS   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = tree;
	this.dynGrid = null;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	
	populateOrganisations(voColl, null);		
}
 
Example 41
Project: openMAXIMS   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = null;
	this.dynGrid = grid;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.dynGrid.getRows().clear();	
	
	populateOrganisations(voColl, null);
}
 
Example 42
Project: openMAXIMS   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive, boolean disableOrgNodes)
{
	this.tree = tree;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	populateOrgs(voColl, null, disableOrgNodes);		
}
 
Example 43
Project: openMAXIMS   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrgs(OrganisationVoCollection voColl, TreeNode parentNode, boolean disableOrgNodes)
{
	if (voColl == null)
		return;

	for (int i = 0; i < voColl.size(); i++)
	{
		OrganisationVo voOrg = voColl.get(i);
		if (voOrg.getIsActive().booleanValue() == false && !showInactive)
			continue;
		
		TreeNode orgNode = null;
		if (parentNode == null)
		{
			//WDEV-6444 - if node is inactive disable drag dropping for that node
			if(voOrg.getIsActive().booleanValue() == false)
				orgNode = tree.getNodes().add(voOrg, voOrg.getName());
			else
				orgNode = tree.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		}
		else
			orgNode = parentNode.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		Image img = voOrg.getIsActive().booleanValue() ? orgImg : orgDisImg;			
		orgNode.setCollapsedImage(img);
		orgNode.setExpandedImage(img);
		orgNode.setEnabled(!disableOrgNodes);
		
		populateOrgs(voOrg.getRelatedOrganisations().sort(), orgNode, disableOrgNodes);
		populateLocSites(voOrg.getLocationSites().sort(), orgNode);
	}
}
 
Example 44
Project: openMAXIMS   File: GPPracticeAdminImpl.java   Source Code and License 5 votes vote down vote up
public OrganisationVoCollection listPracticeParents(String value,
		Boolean activeOnly)
{
	if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
	{
		OrganisationAndLocation organisationAndLocation = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
		return organisationAndLocation.listPCTs(value, activeOnly);
	}
	// TODO Auto-generated method stub
	return null;
}
 
Example 45
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadOrganisations() 
{
	form.qmbReferringOrg().clear();
	
	OrganisationVoCollection voColl = domain.listOrganisation(new OrganisationVo());

	for (int i = 0 ; i < voColl.size() ; i++)
	{
		if (voColl.get(i).getIsActiveIsNotNull() && voColl.get(i).getIsActive().booleanValue())
			form.qmbReferringOrg().newRow(voColl.get(i), voColl.get(i).getName());
	}
}
 
Example 46
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateListControl()
{
	OrganisationVoCollection voColl = domain.listOrganisation(null);

	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl);
	form.treHeader().expandAll();
}
 
Example 47
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{		
	form.btnSave().setEnabled(false);
	
	OrganisationVoCollection voColl = null;
	voColl = domain.listRootOrgsNoGpp();				
	new OrgTreeHelper(form.getImages().Admin.Organisation, null, form.getImages().Admin.LocationSite, null, form.getImages().Admin.Location, null).populateOrgTree(form.treOrganisationLocation(), voColl, false, false, false);

	form.treOrganisationLocation().expandAll();
}
 
Example 48
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
public void open() throws PresentationLogicException
{
	OrganisationVo voOrg = new OrganisationVo();
	clearInstanceControls();
	voOrg.setParentOrganisation(null);
	OrganisationVoCollection voColl = domain.listOrganisation(voOrg);
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.LocationSite, form.getImages().Admin.Location, form.getImages().Admin.Location).populateOrgTree(form.treHeader(), voColl, false, false, true);
	form.treHeader().expandAll();
	form.setMode(FormMode.VIEW);
}
 
Example 49
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationTree()
{
	OrganisationVoCollection voColl = domain.listRootOrgs().sort();
	new OrgTreeHelper(form.getImages().Admin.Organisation, form.getImages().Admin.LocationSite, form.getImages().Admin.Location).populateOrgTree(form.lyrLHS().tabOrganisation().treOrganisation(), voColl);
	form.lyrLHS().tabOrganisation().treOrganisation().expandAll();
	// populateOrganisationTree(voColl);
}
 
Example 50
Project: openmaxims-linux   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = tree;
	this.dynGrid = null;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	
	populateOrganisations(voColl, null);		
}
 
Example 51
Project: openmaxims-linux   File: OrganisationLocationHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive)
{
	this.tree = null;
	this.dynGrid = grid;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.dynGrid.getRows().clear();	
	
	populateOrganisations(voColl, null);
}
 
Example 52
Project: openmaxims-linux   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes, boolean showInactive, boolean disableOrgNodes)
{
	this.tree = tree;
	this.showInactive = showInactive;
	this.showCheckBoxes = showCheckBoxes;
	this.tree.clear();		
	populateOrgs(voColl, null, disableOrgNodes);		
}
 
Example 53
Project: openmaxims-linux   File: OrgTreeHelper.java   Source Code and License 5 votes vote down vote up
private void populateOrgs(OrganisationVoCollection voColl, TreeNode parentNode, boolean disableOrgNodes)
{
	if (voColl == null)
		return;

	for (int i = 0; i < voColl.size(); i++)
	{
		OrganisationVo voOrg = voColl.get(i);
		if (voOrg.getIsActive().booleanValue() == false && !showInactive)
			continue;
		
		TreeNode orgNode = null;
		if (parentNode == null)
		{
			//WDEV-6444 - if node is inactive disable drag dropping for that node
			if(voOrg.getIsActive().booleanValue() == false)
				orgNode = tree.getNodes().add(voOrg, voOrg.getName());
			else
				orgNode = tree.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		}
		else
			orgNode = parentNode.getNodes().add(voOrg, voOrg.getName(), ORG_NODE, new int[]{ROOT, ORG_NODE}, true);
		Image img = voOrg.getIsActive().booleanValue() ? orgImg : orgDisImg;			
		orgNode.setCollapsedImage(img);
		orgNode.setExpandedImage(img);
		orgNode.setEnabled(!disableOrgNodes);
		
		populateOrgs(voOrg.getRelatedOrganisations().sort(), orgNode, disableOrgNodes);
		populateLocSites(voOrg.getLocationSites().sort(), orgNode);
	}
}
 
Example 54
Project: openmaxims-linux   File: GPPracticeAdminImpl.java   Source Code and License 5 votes vote down vote up
public OrganisationVoCollection listPracticeParents(String value,
		Boolean activeOnly)
{
	if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
	{
		OrganisationAndLocation organisationAndLocation = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
		return organisationAndLocation.listPCTs(value, activeOnly);
	}
	// TODO Auto-generated method stub
	return null;
}
 
Example 55
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 4 votes vote down vote up
public void populateOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl)
{
	populateOrganisationLocationTree(tree, voColl, false, false);
}
 
Example 56
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 4 votes vote down vote up
public void populateOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl)
{
	populateOrganisationLocationDynamicGrid(grid, voColl, false, false);
}
 
Example 57
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 4 votes vote down vote up
public void populatOrganisationLocationTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes)
{
	populateOrganisationLocationTree(tree, voColl, showCheckBoxes, false);
}
 
Example 58
Project: AvoinApotti   File: OrganisationLocationHelper.java   Source Code and License 4 votes vote down vote up
public void populatOrganisationLocationDynamicGrid(DynamicGrid grid, OrganisationVoCollection voColl, boolean showCheckBoxes)
{
	populateOrganisationLocationDynamicGrid(grid, voColl, showCheckBoxes, false);
}
 
Example 59
Project: AvoinApotti   File: OrgTreeHelper.java   Source Code and License 4 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl)
{
	populateOrgTree(tree, voColl, false, false, false);
}
 
Example 60
Project: AvoinApotti   File: OrgTreeHelper.java   Source Code and License 4 votes vote down vote up
public void populateOrgTree(TreeView tree, OrganisationVoCollection voColl, boolean showCheckBoxes)
{
	populateOrgTree(tree, voColl, showCheckBoxes, false, false);
}