Java Code Examples for ims.nursing.vo.CarePlanTitleCollection

The following are top voted examples for showing how to use ims.nursing.vo.CarePlanTitleCollection. 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 initialise(Object[] args) 
{
	form.btnSave().setEnabled(false);

	if(args == null)
		return;
	
	if(args.length == 1)
	{
		if(args[0] instanceof CarePlanTitleCollection)
		{
			
			CarePlanTitleCollection voCPs = (CarePlanTitleCollection) args[0];
			form.getLocalContext().setCarePlansTitleCollection(voCPs);
			populateGrid(voCPs);
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans()
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			
			if(isClinicalNotesCarePlanDetailsAlias() && form.getGlobalContext().COE.getCarePlanIsNotNull())
			{
				if(title.equals(form.getGlobalContext().COE.getCarePlan()))
				{
					row.setcolSelect(true);
				}
			}
			row.setValue(title);
		}

	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	// Populate the careplan selected column with data from database
	if (form.getLocalContext().getClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans(boolean bActiveOnly)
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);

			if ( bActiveOnly
				&& (title.getCurrentCarePlanStatusIsNotNull() 
						&& title.getCurrentCarePlanStatus().getStatusIsNotNull()
						&& ! title.getCurrentCarePlanStatus().getStatus().equals(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)) )
				continue;
			
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			row.setcolStatus(title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() ? title.getCurrentCarePlanStatus().getStatus().getText() : "");
			row.setValue(title);
		}

	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	if (form.getLocalContext().getSelectedClinicalNoteIsNotNull()
		&& form.getLocalContext().getSelectedClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getSelectedClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void initialise(Object[] args) 
{
	form.btnSave().setEnabled(false);

	if(args == null)
		return;
	
	if(args.length == 1)
	{
		if(args[0] instanceof CarePlanTitleCollection)
		{
			
			CarePlanTitleCollection voCPs = (CarePlanTitleCollection) args[0];
			form.getLocalContext().setCarePlansTitleCollection(voCPs);
			populateGrid(voCPs);
		}
	}
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans()
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			
			if(isClinicalNotesCarePlanDetailsAlias() && form.getGlobalContext().COE.getCarePlanIsNotNull())
			{
				if(title.equals(form.getGlobalContext().COE.getCarePlan()))
				{
					row.setcolSelect(true);
				}
			}
			row.setValue(title);
		}

	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	// Populate the careplan selected column with data from database
	if (form.getLocalContext().getClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans(boolean bActiveOnly)
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);

			if ( bActiveOnly
				&& (title.getCurrentCarePlanStatusIsNotNull() 
						&& title.getCurrentCarePlanStatus().getStatusIsNotNull()
						&& ! title.getCurrentCarePlanStatus().getStatus().equals(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)) )
				continue;
			
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			row.setcolStatus(title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() ? title.getCurrentCarePlanStatus().getStatus().getText() : "");
			row.setValue(title);
		}

	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	if (form.getLocalContext().getSelectedClinicalNoteIsNotNull()
		&& form.getLocalContext().getSelectedClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getSelectedClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void initialise(Object[] args) 
{
	form.btnSave().setEnabled(false);

	if(args == null)
		return;
	
	if(args.length == 1)
	{
		if(args[0] instanceof CarePlanTitleCollection)
		{
			
			CarePlanTitleCollection voCPs = (CarePlanTitleCollection) args[0];
			form.getLocalContext().setCarePlansTitleCollection(voCPs);
			populateGrid(voCPs);
		}
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans()
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			
			if(isClinicalNotesCarePlanDetailsAlias() && form.getGlobalContext().COE.getCarePlanIsNotNull())
			{
				if(title.equals(form.getGlobalContext().COE.getCarePlan()))
				{
					row.setcolSelect(true);
				}
			}
			row.setValue(title);
		}

	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	// Populate the careplan selected column with data from database
	if (form.getLocalContext().getClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans(boolean bActiveOnly)
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);

			if ( bActiveOnly
				&& (title.getCurrentCarePlanStatusIsNotNull() 
						&& title.getCurrentCarePlanStatus().getStatusIsNotNull()
						&& ! title.getCurrentCarePlanStatus().getStatus().equals(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)) )
				continue;
			
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			row.setcolStatus(title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() ? title.getCurrentCarePlanStatus().getStatus().getText() : "");
			row.setValue(title);
		}

	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	if (form.getLocalContext().getSelectedClinicalNoteIsNotNull()
		&& form.getLocalContext().getSelectedClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getSelectedClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void initialise(Object[] args) 
{
	form.btnSave().setEnabled(false);

	if(args == null)
		return;
	
	if(args.length == 1)
	{
		if(args[0] instanceof CarePlanTitleCollection)
		{
			
			CarePlanTitleCollection voCPs = (CarePlanTitleCollection) args[0];
			form.getLocalContext().setCarePlansTitleCollection(voCPs);
			populateGrid(voCPs);
		}
	}
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans()
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			
			if(isClinicalNotesCarePlanDetailsAlias() && form.getGlobalContext().COE.getCarePlanIsNotNull())
			{
				if(title.equals(form.getGlobalContext().COE.getCarePlan()))
				{
					row.setcolSelect(true);
				}
			}
			row.setValue(title);
		}

	}
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	// Populate the careplan selected column with data from database
	if (form.getLocalContext().getClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlans(boolean bActiveOnly)
{
	CarePlanTitleCollection coll = form.getLocalContext().getCarePlans();

	if (coll != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow row;
		for (int i = 0; i < coll.size(); i++)
		{
			CarePlanTitle title = coll.get(i);

			if ( bActiveOnly
				&& (title.getCurrentCarePlanStatusIsNotNull() 
						&& title.getCurrentCarePlanStatus().getStatusIsNotNull()
						&& ! title.getCurrentCarePlanStatus().getStatus().equals(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)) )
				continue;
			
			row = form.gridCarePlan().getRows().newRow();
			row.setcolCarePlan(title.getTitle());
			row.setcolStatus(title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() ? title.getCurrentCarePlanStatus().getStatus().getText() : "");
			row.setValue(title);
		}

	}
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateCarePlans()
{
	if (form.getLocalContext().getSelectedClinicalNoteIsNotNull()
		&& form.getLocalContext().getSelectedClinicalNote().getCarePlans() != null)
	{
		CarePlanTitleCollection dataColl = form.getLocalContext().getSelectedClinicalNote().getCarePlans();
		if (dataColl != null)
		{
			GenForm.gridCarePlanRow row;
			for (int i = 0; i < dataColl.size(); i++)
			{
				CarePlanTitle title = dataColl.get(i);
				row = form.gridCarePlan().getRowByValue(title);
				if (row != null)
					row.setcolSelect(true);
			}
		}
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 22
Project: AvoinApotti   File: ClinicalNotesImpl.java   View source code 5 votes vote down vote up
/**
 * list care plans, by clinical contact id
 */
public CarePlanTitleCollection listCarePlans(CareContextShortVo careContextShortVo) 
{

	DomainFactory factory = getDomainFactory();	
	StringBuffer hql = new StringBuffer(" ");
	String query = "from CarePlan careplan ";
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();
	String andStr = " ";

	if (careContextShortVo != null)
	{
		hql.append(andStr + " careplan.careContext.id = :rcc");
		markers.add("rcc");
		values.add(careContextShortVo.getID_CareContext());
		andStr = " and ";
		hql.append(andStr + " careplan.currentCarePlanStatus.status = :status");
		markers.add("status");
		values.add(getDomLookup(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE));
	}
	
	if (markers.size() > 0) query += " where ";
	query += hql.toString();
	List<?> cpTitle = factory.find(query, markers, values);		  					
	
	return(CarePlanTitleAssembler.createCarePlanTitleCollectionFromCarePlan(cpTitle).sort()); //this is the problem
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 25
Project: openMAXIMS   File: ClinicalNotesImpl.java   View source code 5 votes vote down vote up
/**
 * list care plans, by clinical contact id
 */
public CarePlanTitleCollection listCarePlans(CareContextShortVo careContextShortVo) 
{

	DomainFactory factory = getDomainFactory();	
	StringBuffer hql = new StringBuffer(" ");
	String query = "from CarePlan careplan ";
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();
	String andStr = " ";

	if (careContextShortVo != null)
	{
		hql.append(andStr + " careplan.careContext.id = :rcc");
		markers.add("rcc");
		values.add(careContextShortVo.getID_CareContext());
		andStr = " and ";
		hql.append(andStr + " careplan.currentCarePlanStatus.status = :status");
		markers.add("status");
		values.add(getDomLookup(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE));
	}
	
	if (markers.size() > 0) query += " where ";
	query += hql.toString();
	List<?> cpTitle = factory.find(query, markers, values);		  					
	
	return(CarePlanTitleAssembler.createCarePlanTitleCollectionFromCarePlan(cpTitle).sort()); //this is the problem
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 28
Project: openMAXIMS   File: ClinicalNotesImpl.java   View source code 5 votes vote down vote up
/**
 * list care plans, by clinical contact id
 */
public CarePlanTitleCollection listCarePlans(CareContextShortVo careContextShortVo) 
{

	DomainFactory factory = getDomainFactory();	
	StringBuffer hql = new StringBuffer(" ");
	String query = "from CarePlan careplan ";
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();
	String andStr = " ";

	if (careContextShortVo != null)
	{
		hql.append(andStr + " careplan.careContext.id = :rcc");
		markers.add("rcc");
		values.add(careContextShortVo.getID_CareContext());
		andStr = " and ";
		hql.append(andStr + " careplan.currentCarePlanStatus.status = :status");
		markers.add("status");
		values.add(getDomLookup(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE));
	}
	
	if (markers.size() > 0) query += " where ";
	query += hql.toString();
	List<?> cpTitle = factory.find(query, markers, values);		  					
	
	return(CarePlanTitleAssembler.createCarePlanTitleCollectionFromCarePlan(cpTitle).sort()); //this is the problem
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 31
Project: openmaxims-linux   File: ClinicalNotesImpl.java   View source code 5 votes vote down vote up
/**
 * list care plans, by clinical contact id
 */
public CarePlanTitleCollection listCarePlans(CareContextShortVo careContextShortVo) 
{

	DomainFactory factory = getDomainFactory();	
	StringBuffer hql = new StringBuffer(" ");
	String query = "from CarePlan careplan ";
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();
	String andStr = " ";

	if (careContextShortVo != null)
	{
		hql.append(andStr + " careplan.careContext.id = :rcc");
		markers.add("rcc");
		values.add(careContextShortVo.getID_CareContext());
		andStr = " and ";
		hql.append(andStr + " careplan.currentCarePlanStatus.status = :status");
		markers.add("status");
		values.add(getDomLookup(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE));
	}
	
	if (markers.size() > 0) query += " where ";
	query += hql.toString();
	List<?> cpTitle = factory.find(query, markers, values);		  					
	
	return(CarePlanTitleAssembler.createCarePlanTitleCollectionFromCarePlan(cpTitle).sort()); //this is the problem
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private CarePlanTitleCollection listCarePlans() 
{
	CarePlanTitleCollection voColl = new CarePlanTitleCollection();
	
	for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++)
	{
		if (form.gridCarePlan().getRows().get(i).getcolSelect())
			voColl.add(form.gridCarePlan().getRows().get(i).getValue());
	}
	return voColl;
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void populateGrid(CarePlanTitleCollection voCPs)
{
	form.dyngrdInterventions().getRows().clear();
	
	CarePlanCollection voCarePlans = null;
	
	if (voCPs != null && voCPs.size() > 0)
		voCarePlans = domain.listCarePlans(voCPs);
	
	for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
	{
		voCarePlans.get(i).getInterventions().sort();
		
		for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
		{
			CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);
			
			DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
			//WDEV-16795 
			String removalInfo = "";
			if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
			{
				row.setReadOnly(true);
				row.setBackColor(Color.Gray);
				removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
			}
			
			DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
			cellOrdNum.setValue(voInt.getOrder().toString());
			//WDEV-16795
			cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellOrdNum.setReadOnly(Boolean.TRUE);

			DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
			cellDesc.setValue(voInt.getDescription().toString());
			//WDEV-16795
			cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellDesc.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
			cellInfo.setValue(voInt.getAdditionalInfo());
			//WDEV-16795 
			cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellInfo.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
			cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
			cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
			cellComp.setAutoPostBack(Boolean.TRUE);
			
			DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
			cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
			//WDEV-16795 
			cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
			cellCompInfo.setReadOnly(Boolean.TRUE);
			
			row.setValue(voCarePlans.get(i));
			row.setIdentifier(voInt);
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void populateGrid(CarePlanTitleCollection voCPs)
{
	form.dyngrdInterventions().getRows().clear();
	
	CarePlanCollection voCarePlans = null;
	
	if (voCPs != null && voCPs.size() > 0)
		voCarePlans = domain.listCarePlans(voCPs);
	
	for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
	{
		voCarePlans.get(i).getInterventions().sort();
		
		for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
		{
			CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);
			
			DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
			//WDEV-16795 
			String removalInfo = "";
			String lineDelimiter = "<br/>"; 
			boolean isCcoSpecific = ConfigFlag.GEN.CARE_PLAN_FUNCTIONALITY_TYPE.getValue().equals("CCO");
			boolean isRemovedOrReinstatedAction = voInt != null && isCcoSpecific && (Boolean.TRUE.equals(voInt.getIsRemoved()) || Boolean.FALSE.equals(voInt.getIsRemoved())); //WDEV-16795
			if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
			{
				row.setReadOnly(true);
				row.setBackColor(Color.LightGray);										
			}
			if (isRemovedOrReinstatedAction)
			{
				removalInfo = buildRemovedReinstatedActionTooltip(voInt);
			}
			//---- end WDEV-16795
			DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
			cellOrdNum.setValue(voInt.getOrder().toString());
			//WDEV-16795
			cellOrdNum.setTooltip(voInt.getOrderIsNotNull() ? voInt.getOrder().toString() + lineDelimiter + removalInfo : removalInfo);
			cellOrdNum.setReadOnly(Boolean.TRUE);

			DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
			cellDesc.setValue(voInt.getDescription().toString());
			//WDEV-16795
			cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + lineDelimiter + removalInfo: removalInfo);
			cellDesc.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
			cellInfo.setValue(voInt.getAdditionalInfo());
			//WDEV-16795 
			cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() + lineDelimiter + removalInfo: removalInfo);
			cellInfo.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
			cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
			cellComp.setReadOnly(voInt.getStopDateIsNotNull());
			cellComp.setTooltip(Boolean.TRUE.equals(row.isReadOnly()) || voInt.getStopDateIsNotNull() ?  removalInfo : ""); //WDEV-16795
			cellComp.setAutoPostBack(Boolean.TRUE);
			
			DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
			cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) : "");
			//WDEV-16795 
			cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) + lineDelimiter + removalInfo: removalInfo);
			cellCompInfo.setReadOnly(Boolean.TRUE);
			if (isRemovedOrReinstatedAction)
				cellCompInfo.setIdentifier(isRemovedOrReinstatedAction); //WDEV-16795 
									
			row.setValue(voCarePlans.get(i));
			row.setIdentifier(voInt);
			
		}
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void populateGrid(CarePlanTitleCollection voCPs)
{
	form.dyngrdInterventions().getRows().clear();
	
	CarePlanCollection voCarePlans = null;
	
	if (voCPs != null && voCPs.size() > 0)
		voCarePlans = domain.listCarePlans(voCPs);
	
	for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
	{
		voCarePlans.get(i).getInterventions().sort();
		
		for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
		{
			CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);
			
			DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
			//WDEV-16795 
			String removalInfo = "";
			if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
			{
				row.setReadOnly(true);
				row.setBackColor(Color.Gray);
				removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
			}
			
			DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
			cellOrdNum.setValue(voInt.getOrder().toString());
			//WDEV-16795
			cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellOrdNum.setReadOnly(Boolean.TRUE);

			DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
			cellDesc.setValue(voInt.getDescription().toString());
			//WDEV-16795
			cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellDesc.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
			cellInfo.setValue(voInt.getAdditionalInfo());
			//WDEV-16795 
			cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellInfo.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
			cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
			cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
			cellComp.setAutoPostBack(Boolean.TRUE);
			
			DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
			cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
			//WDEV-16795 
			cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
			cellCompInfo.setReadOnly(Boolean.TRUE);
			
			row.setValue(voCarePlans.get(i));
			row.setIdentifier(voInt);
		}
	}
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 4 votes vote down vote up
private void populateGrid(CarePlanTitleCollection voCPs)
{
	form.dyngrdInterventions().getRows().clear();
	
	CarePlanCollection voCarePlans = null;
	
	if (voCPs != null && voCPs.size() > 0)
		voCarePlans = domain.listCarePlans(voCPs);
	
	for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
	{
		voCarePlans.get(i).getInterventions().sort();
		
		for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
		{
			CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);
			
			DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
			//WDEV-16795 
			String removalInfo = "";
			if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
			{
				row.setReadOnly(true);
				row.setBackColor(Color.Gray);
				removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
			}
			
			DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
			cellOrdNum.setValue(voInt.getOrder().toString());
			//WDEV-16795
			cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellOrdNum.setReadOnly(Boolean.TRUE);

			DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
			cellDesc.setValue(voInt.getDescription().toString());
			//WDEV-16795
			cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellDesc.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
			cellInfo.setValue(voInt.getAdditionalInfo());
			//WDEV-16795 
			cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellInfo.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
			cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
			cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
			cellComp.setAutoPostBack(Boolean.TRUE);
			
			DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
			cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
			//WDEV-16795 
			cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
			cellCompInfo.setReadOnly(Boolean.TRUE);
			
			row.setValue(voCarePlans.get(i));
			row.setIdentifier(voInt);
		}
	}
}