Java Code Examples for ims.nursing.vo.lookups.PlanOfCareStatus

The following are top voted examples for showing how to use ims.nursing.vo.lookups.PlanOfCareStatus. 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 onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
		onCmbStatusPOCValueChanged();
	}

	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
		onCmbStatusPOCValueChanged();
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updatePlanOfCare(int menuItemID) 
{	
	clearPocDetailsInstanceControls();
	form.setMode(FormMode.EDIT);

	PlanOfCareStatus pocStatus = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

	}

	populateStatusPocTypeCombo(menuItemID, pocStatus);
	displayPocDetailsTabOnly(menuItemID, pocStatus);
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
		onCmbStatusPOCValueChanged();
	}

	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
		onCmbStatusPOCValueChanged();
	}
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updatePlanOfCare(int menuItemID) 
{	
	clearPocDetailsInstanceControls();
	form.setMode(FormMode.EDIT);

	PlanOfCareStatus pocStatus = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

	}

	populateStatusPocTypeCombo(menuItemID, pocStatus);
	displayPocDetailsTabOnly(menuItemID, pocStatus);
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
		onCmbStatusPOCValueChanged();
	}

	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
		onCmbStatusPOCValueChanged();
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updatePlanOfCare(int menuItemID) 
{	
	clearPocDetailsInstanceControls();
	form.setMode(FormMode.EDIT);

	PlanOfCareStatus pocStatus = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

	}

	populateStatusPocTypeCombo(menuItemID, pocStatus);
	displayPocDetailsTabOnly(menuItemID, pocStatus);
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
		onCmbStatusPOCValueChanged();
	}

	if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
	{
		showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
		form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
		onCmbStatusPOCValueChanged();
	}
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updatePlanOfCare(int menuItemID) 
{	
	clearPocDetailsInstanceControls();
	form.setMode(FormMode.EDIT);

	PlanOfCareStatus pocStatus = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

	}

	populateStatusPocTypeCombo(menuItemID, pocStatus);
	displayPocDetailsTabOnly(menuItemID, pocStatus);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
	if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
	{
		listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
	}
	else
	{
		form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
		listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
	}	
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
	if (status != null)
	{
		PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
		NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
		helper.displayActionsGroupByPlan(coll, false);
		updateContextMenuState();
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
	if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
	{
		if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
		}
		else
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
		}
	}
	else
	{
		/*if (!returnFlagStatus()) //WDEV-15094
		{
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
		}
		if (returnFlagStatus())
		{
			engine.showMessage("Select Active, Resolved or Requires Confirmation");
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);	
		}*/

		showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
	if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
	{
		listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
	}
	else
	{
		form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
		listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
	}	
	
	form.getGlobalContext().Nursing.setPlanOfCareSearchCriteria(getSearchCriteria());//WDEV-19389 
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
	if (status != null)
	{
		PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
		NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
		helper.displayActionsGroupByPlan(coll, false);
		updateContextMenuState();
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
	if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
	{
		if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
		}
		else
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
		}
	}
	else
	{
		/*if (!returnFlagStatus()) //WDEV-15094
		{
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
		}
		if (returnFlagStatus())
		{
			engine.showMessage("Select Active, Resolved or Requires Confirmation");
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);	
		}*/

		showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
	if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
	{
		listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
	}
	else
	{
		form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
		listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
	}	
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
	if (status != null)
	{
		PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
		NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
		helper.displayActionsGroupByPlan(coll, false);
		updateContextMenuState();
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
	if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
	{
		if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
		}
		else
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
		}
	}
	else
	{
		/*if (!returnFlagStatus()) //WDEV-15094
		{
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
		}
		if (returnFlagStatus())
		{
			engine.showMessage("Select Active, Resolved or Requires Confirmation");
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);	
		}*/

		showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
	}
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
	if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
	{
		listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
	}
	else
	{
		form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
		listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
	}	
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
	if (status != null)
	{
		PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
		NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
		helper.displayActionsGroupByPlan(coll, false);
		updateContextMenuState();
	}
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
	if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
	{
		if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
		}
		else
		{
			showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
		}
	}
	else
	{
		/*if (!returnFlagStatus()) //WDEV-15094
		{
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
		}
		if (returnFlagStatus())
		{
			engine.showMessage("Select Active, Resolved or Requires Confirmation");
			form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);	
		}*/

		showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void listActivePlansOfCare()
{
	form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
	listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
}
 
Example 22
Project: AvoinApotti   File: PlanOfCareImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 23
Project: AvoinApotti   File: NursingSummaryImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Comparable> values = new ArrayList<Comparable>();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	if(date1 != null && date2 != null)
	{
		condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
		markers.add("DATE1");
		values.add(date1.getJavaDate());
		markers.add("DATE2");
		values.add(date2.getJavaDate());
		
		andStr = " and ";
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 24
Project: AvoinApotti   File: DailyPatientProgressImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
	if (careContext == null)
		throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

	if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
		return null;

	StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
	ArrayList values = new ArrayList();
	ArrayList params = new ArrayList();
	
	query.append(" poc.status is not :status ");
	params.add("status");
	values.add(getDomLookup(PlanOfCareStatus.RESOLVED));
	
	if(careContext != null)
	{
		if(values.size() > 0)
			query.append(" and ");
		query.append("poc.careContext.id =:careContextID");
		params.add("careContextID");
		values.add(careContext.getID_CareContext());
	}

	if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
	{
		if (values.size() > 0)
			query.append(" and ");
		query.append(" poc.assessmentQuestion.id in ");
		query.append("(");
		for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
		{
			AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
			query.append(" :assQId" + Integer.toString(i));
			if (i < (assessmentQuestionRefVoColl.size() - 1))
				query.append(", ");
			params.add("assQId" + Integer.toString(i));
			values.add(voAssQ.getID_AssessmentQuestion());
		}
		query.append(")");
	}
	
	DomainFactory factory = getDomainFactory();
	List list = factory.find(query.toString(), params, values);
	
	return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void listActivePlansOfCare()
{
	form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
	listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
}
 
Example 26
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 27
Project: openMAXIMS   File: NursingSummaryImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Comparable> values = new ArrayList<Comparable>();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	if(date1 != null && date2 != null)
	{
		condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
		markers.add("DATE1");
		values.add(date1.getJavaDate());
		markers.add("DATE2");
		values.add(date2.getJavaDate());
		
		andStr = " and ";
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 28
Project: openMAXIMS   File: DailyPatientProgressImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
	if (careContext == null)
		throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

	if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
		return null;

	StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
	ArrayList values = new ArrayList();
	ArrayList params = new ArrayList();
	
	query.append(" poc.status is not :status ");
	params.add("status");
	values.add(getDomLookup(PlanOfCareStatus.RESOLVED));
	
	if(careContext != null)
	{
		if(values.size() > 0)
			query.append(" and ");
		query.append("poc.careContext.id =:careContextID");
		params.add("careContextID");
		values.add(careContext.getID_CareContext());
	}

	if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
	{
		if (values.size() > 0)
			query.append(" and ");
		query.append(" poc.assessmentQuestion.id in ");
		query.append("(");
		for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
		{
			AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
			query.append(" :assQId" + Integer.toString(i));
			if (i < (assessmentQuestionRefVoColl.size() - 1))
				query.append(", ");
			params.add("assQId" + Integer.toString(i));
			values.add(voAssQ.getID_AssessmentQuestion());
		}
		query.append(")");
	}
	
	DomainFactory factory = getDomainFactory();
	List list = factory.find(query.toString(), params, values);
	
	return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void listActivePlansOfCare()
{
	form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
	listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
}
 
Example 30
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 31
Project: openMAXIMS   File: NursingSummaryImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Comparable> values = new ArrayList<Comparable>();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	if(date1 != null && date2 != null)
	{
		condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
		markers.add("DATE1");
		values.add(date1.getJavaDate());
		markers.add("DATE2");
		values.add(date2.getJavaDate());
		
		andStr = " and ";
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 32
Project: openMAXIMS   File: DailyPatientProgressImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
	if (careContext == null)
		throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

	if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
		return null;

	StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
	ArrayList values = new ArrayList();
	ArrayList params = new ArrayList();
	
	query.append(" poc.status is not :status ");
	params.add("status");
	values.add(getDomLookup(PlanOfCareStatus.RESOLVED));
	
	if(careContext != null)
	{
		if(values.size() > 0)
			query.append(" and ");
		query.append("poc.careContext.id =:careContextID");
		params.add("careContextID");
		values.add(careContext.getID_CareContext());
	}

	if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
	{
		if (values.size() > 0)
			query.append(" and ");
		query.append(" poc.assessmentQuestion.id in ");
		query.append("(");
		for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
		{
			AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
			query.append(" :assQId" + Integer.toString(i));
			if (i < (assessmentQuestionRefVoColl.size() - 1))
				query.append(", ");
			params.add("assQId" + Integer.toString(i));
			values.add(voAssQ.getID_AssessmentQuestion());
		}
		query.append(")");
	}
	
	DomainFactory factory = getDomainFactory();
	List list = factory.find(query.toString(), params, values);
	
	return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void listActivePlansOfCare()
{
	form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
	listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue());	
}
 
Example 34
Project: openmaxims-linux   File: PlanOfCareImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 35
Project: openmaxims-linux   File: NursingSummaryImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
	if(voCareContextRef == null)
		throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");
	
	DomainFactory factory = getDomainFactory();
	
	String hql = new String();

	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Comparable> values = new ArrayList<Comparable>();
	
	hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";
	
	if(status != null)
	{
		if (status.equals(PlanOfCareStatus.CURRENT))
		{
			condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
			andStr = " and ";	
		}
		else
		{
			condStr.append(andStr + " p1_1.status.id = :STATUS ");
			markers.add("STATUS");
			values.add(new Integer(status.getId()));
		
			andStr = " and ";
		}
	}
	
	if(date1 != null && date2 != null)
	{
		condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
		markers.add("DATE1");
		values.add(date1.getJavaDate());
		markers.add("DATE2");
		values.add(date2.getJavaDate());
		
		andStr = " and ";
	}
	
	condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
	markers.add("CONTEXT");
	values.add(voCareContextRef.getID_CareContext());
	
	hql += " where ";

	hql += condStr.toString();
	hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";
	
	return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
 
Example 36
Project: openmaxims-linux   File: DailyPatientProgressImpl.java   Source Code and License 4 votes vote down vote up
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
	if (careContext == null)
		throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

	if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
		return null;

	StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
	ArrayList values = new ArrayList();
	ArrayList params = new ArrayList();
	
	query.append(" poc.status is not :status ");
	params.add("status");
	values.add(getDomLookup(PlanOfCareStatus.RESOLVED));
	
	if(careContext != null)
	{
		if(values.size() > 0)
			query.append(" and ");
		query.append("poc.careContext.id =:careContextID");
		params.add("careContextID");
		values.add(careContext.getID_CareContext());
	}

	if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
	{
		if (values.size() > 0)
			query.append(" and ");
		query.append(" poc.assessmentQuestion.id in ");
		query.append("(");
		for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
		{
			AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
			query.append(" :assQId" + Integer.toString(i));
			if (i < (assessmentQuestionRefVoColl.size() - 1))
				query.append(", ");
			params.add("assQId" + Integer.toString(i));
			values.add(voAssQ.getID_AssessmentQuestion());
		}
		query.append(")");
	}
	
	DomainFactory factory = getDomainFactory();
	List list = factory.find(query.toString(), params, values);
	
	return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}