Java Code Examples for ims.nursing.vo.PlanOfCareVo

The following are top voted examples for showing how to use ims.nursing.vo.PlanOfCareVo. 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
private void setCustomCompomentValue(IComponent customControl, PlanOfCareVo record) 
{
	AuthoringInformationVo voAuthoringStart = new AuthoringInformationVo();
	if (customControl.equals(form.lyrPOC().tabPocDetails().customStart()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getStartDateTime());
		voAuthoringStart.setAuthoringHcp(record.getStartHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customResolved()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getResolvedDateTime());
		voAuthoringStart.setAuthoringHcp(record.getResolvingHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customConfirming()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getConfirmingDateTime());
		voAuthoringStart.setAuthoringHcp(record.getConfirmingHCP());
	}

	customControl.setValue(voAuthoringStart);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onDyngrdPOCCellButtonClicked(DynamicGridCell cell) 
{
	if (cell != null && cell.getType().equals(DynamicCellType.IMAGEBUTTON))
	{
		if(cell.getRow().getValue() instanceof PlanOfCareListVo)
		{
			PlanOfCareVo record = new PlanOfCareVo();
			PlanOfCareLiteVo voRow = (PlanOfCareLiteVo) cell.getRow().getValue();
			record = domain.getPlanOfCare(voRow);
			form.getLocalContext().setSelectedRecord(record);

			String url = getUrlText(record);
			if(url != null && url.length() > 0)
			{
				engine.openUrl(url);
			}		
		}
	}		
}
 
Example 3
Project: AvoinApotti   File: PlanOfCareImpl.java   Source Code and License 6 votes vote down vote up
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
	if(record == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	if(!record.isValidated())
	{
		throw new CodingRuntimeException("Record not validated");
	}
		
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);		
	
	factory.save(domainRecord);
		
	return PlanOfCareVoAssembler.create(domainRecord);
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setCustomCompomentValue(IComponent customControl, PlanOfCareVo record) 
{
	AuthoringInformationVo voAuthoringStart = new AuthoringInformationVo();
	if (customControl.equals(form.lyrPOC().tabPocDetails().customStart()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getStartDateTime());
		voAuthoringStart.setAuthoringHcp(record.getStartHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customResolved()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getResolvedDateTime());
		voAuthoringStart.setAuthoringHcp(record.getResolvingHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customConfirming()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getConfirmingDateTime());
		voAuthoringStart.setAuthoringHcp(record.getConfirmingHCP());
	}

	customControl.setValue(voAuthoringStart);
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onDyngrdPOCCellButtonClicked(DynamicGridCell cell) 
{
	if (cell != null && cell.getType().equals(DynamicCellType.IMAGEBUTTON))
	{
		if(cell.getRow().getValue() instanceof PlanOfCareListVo)
		{
			PlanOfCareVo record = new PlanOfCareVo();
			PlanOfCareLiteVo voRow = (PlanOfCareLiteVo) cell.getRow().getValue();
			record = domain.getPlanOfCare(voRow);
			form.getLocalContext().setSelectedRecord(record);

			String url = getUrlText(record);
			if(url != null && url.length() > 0)
			{
				engine.openUrl(url);
			}		
		}
	}		
}
 
Example 6
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 6 votes vote down vote up
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
	if(record == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	if(!record.isValidated())
	{
		throw new CodingRuntimeException("Record not validated");
	}
		
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);		
	
	factory.save(domainRecord);
		
	return PlanOfCareVoAssembler.create(domainRecord);
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setCustomCompomentValue(IComponent customControl, PlanOfCareVo record) 
{
	AuthoringInformationVo voAuthoringStart = new AuthoringInformationVo();
	if (customControl.equals(form.lyrPOC().tabPocDetails().customStart()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getStartDateTime());
		voAuthoringStart.setAuthoringHcp(record.getStartHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customResolved()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getResolvedDateTime());
		voAuthoringStart.setAuthoringHcp(record.getResolvingHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customConfirming()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getConfirmingDateTime());
		voAuthoringStart.setAuthoringHcp(record.getConfirmingHCP());
	}

	customControl.setValue(voAuthoringStart);
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onDyngrdPOCCellButtonClicked(DynamicGridCell cell) 
{
	if (cell != null && cell.getType().equals(DynamicCellType.IMAGEBUTTON))
	{
		if(cell.getRow().getValue() instanceof PlanOfCareListVo)
		{
			PlanOfCareVo record = new PlanOfCareVo();
			PlanOfCareLiteVo voRow = (PlanOfCareLiteVo) cell.getRow().getValue();
			record = domain.getPlanOfCare(voRow);
			form.getLocalContext().setSelectedRecord(record);

			String url = getUrlText(record);
			if(url != null && url.length() > 0)
			{
				engine.openUrl(url);
			}		
		}
	}		
}
 
Example 9
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 6 votes vote down vote up
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
	if(record == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	if(!record.isValidated())
	{
		throw new CodingRuntimeException("Record not validated");
	}
		
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);		
	
	factory.save(domainRecord);
		
	return PlanOfCareVoAssembler.create(domainRecord);
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setCustomCompomentValue(IComponent customControl, PlanOfCareVo record) 
{
	AuthoringInformationVo voAuthoringStart = new AuthoringInformationVo();
	if (customControl.equals(form.lyrPOC().tabPocDetails().customStart()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getStartDateTime());
		voAuthoringStart.setAuthoringHcp(record.getStartHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customResolved()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getResolvedDateTime());
		voAuthoringStart.setAuthoringHcp(record.getResolvingHCP());
	}
	if (customControl.equals(form.lyrPOC().tabPocDetails().customConfirming()))
	{
		voAuthoringStart.setAuthoringDateTime(record.getConfirmingDateTime());
		voAuthoringStart.setAuthoringHcp(record.getConfirmingHCP());
	}

	customControl.setValue(voAuthoringStart);
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onDyngrdPOCCellButtonClicked(DynamicGridCell cell) 
{
	if (cell != null && cell.getType().equals(DynamicCellType.IMAGEBUTTON))
	{
		if(cell.getRow().getValue() instanceof PlanOfCareListVo)
		{
			PlanOfCareVo record = new PlanOfCareVo();
			PlanOfCareLiteVo voRow = (PlanOfCareLiteVo) cell.getRow().getValue();
			record = domain.getPlanOfCare(voRow);
			form.getLocalContext().setSelectedRecord(record);

			String url = getUrlText(record);
			if(url != null && url.length() > 0)
			{
				engine.openUrl(url);
			}		
		}
	}		
}
 
Example 12
Project: openmaxims-linux   File: PlanOfCareImpl.java   Source Code and License 6 votes vote down vote up
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
	if(record == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	if(!record.isValidated())
	{
		throw new CodingRuntimeException("Record not validated");
	}
		
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);		
	
	factory.save(domainRecord);
		
	return PlanOfCareVoAssembler.create(domainRecord);
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
	PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
	for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
	{
		if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
			return voPlanOfCareColl.get(i);
	}
	return null;
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean save() 
{
	PlanOfCareVo record = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())//is Update or View
	{ 
		record = populateDataFromScreen(form.getLocalContext().getSelectedRecord());		
	}
	else
	{
		record = populateDataFromScreen(new PlanOfCareVo());//is New
	}

	String[] uiErrors = getUiErrors();	
	String[] errors = record.validate(uiErrors);
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	try
	{
		record = domain.savePlanOfCare(record);
	}

	catch(StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		updatePlanOfCare(GenForm.ContextMenus.PlanOfCare.UPDATEPOC);
		return false;
	}

	form.getLocalContext().setSelectedRecord(record);
	return true;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listDailyPatientProgressHistory(Boolean haveDPP, PlanOfCareVo record)
{
	clearGrdDPPList();
	if (haveDPP != null && record != null)
	{
		if (haveDPP.equals(Boolean.TRUE))
		{
			populateGrdDPP(domain.listDailyPatientProgressHistory(form.getGlobalContext().Core.getCurrentCareContext(), record));
		}
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPocActions(PlanOfCareVo record)
{
	clearGrdPocActions();
	if (record != null)
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), record));
	}
	else
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), null));
	}
}
 
Example 17
Project: AvoinApotti   File: PlanOfCareImpl.java   Source Code and License 5 votes vote down vote up
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
	if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);
	
	return PlanOfCareVoAssembler.create(domainObject);
}
 
Example 18
Project: AvoinApotti   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
	if (patientAssessment == null)
		throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

	if (patientAssessment.isValidated() == false)
		throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

	if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
		throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
	factory.save(doPatientAssessment);

	int countNewCarePlan = 0;
	for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
	{
		PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
		if (voPlanOfCare.getID_PlanOfCare() == null)
			countNewCarePlan++;
		PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
		factory.save(doPlanOfCare);
	}

	PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
	Integer newPlanOfCares = new Integer(countNewCarePlan);
	DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

	return item;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
	PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
	for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
	{
		if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
			return voPlanOfCareColl.get(i);
	}
	return null;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean save() 
{
	PlanOfCareVo record = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())//is Update or View
	{ 
		record = populateDataFromScreen(form.getLocalContext().getSelectedRecord());		
	}
	else
	{
		record = populateDataFromScreen(new PlanOfCareVo());//is New
	}

	String[] uiErrors = getUiErrors();	
	String[] errors = record.validate(uiErrors);
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	try
	{
		record = domain.savePlanOfCare(record);
	}

	catch(StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		updatePlanOfCare(GenForm.ContextMenus.PlanOfCare.UPDATEPOC);
		return false;
	}

	form.getLocalContext().setSelectedRecord(record);
	return true;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listDailyPatientProgressHistory(Boolean haveDPP, PlanOfCareVo record)
{
	clearGrdDPPList();
	if (haveDPP != null && record != null)
	{
		if (haveDPP.equals(Boolean.TRUE))
		{
			populateGrdDPP(domain.listDailyPatientProgressHistory(form.getGlobalContext().Core.getCurrentCareContext(), record));
		}
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPocActions(PlanOfCareVo record)
{
	clearGrdPocActions();
	if (record != null)
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), record));
	}
	else
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), null));
	}
}
 
Example 23
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 5 votes vote down vote up
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
	if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);
	
	return PlanOfCareVoAssembler.create(domainObject);
}
 
Example 24
Project: openMAXIMS   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
	if (patientAssessment == null)
		throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

	if (patientAssessment.isValidated() == false)
		throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

	if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
		throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
	factory.save(doPatientAssessment);

	int countNewCarePlan = 0;
	for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
	{
		PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
		if (voPlanOfCare.getID_PlanOfCare() == null)
			countNewCarePlan++;
		PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
		factory.save(doPlanOfCare);
	}

	PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
	Integer newPlanOfCares = new Integer(countNewCarePlan);
	DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

	return item;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
	PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
	for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
	{
		if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
			return voPlanOfCareColl.get(i);
	}
	return null;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean save() 
{
	PlanOfCareVo record = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())//is Update or View
	{ 
		record = populateDataFromScreen(form.getLocalContext().getSelectedRecord());		
	}
	else
	{
		record = populateDataFromScreen(new PlanOfCareVo());//is New
	}

	String[] uiErrors = getUiErrors();	
	String[] errors = record.validate(uiErrors);
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	try
	{
		record = domain.savePlanOfCare(record);
	}

	catch(StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		updatePlanOfCare(GenForm.ContextMenus.PlanOfCare.UPDATEPOC);
		return false;
	}

	form.getLocalContext().setSelectedRecord(record);
	return true;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listDailyPatientProgressHistory(Boolean haveDPP, PlanOfCareVo record)
{
	clearGrdDPPList();
	if (haveDPP != null && record != null)
	{
		if (haveDPP.equals(Boolean.TRUE))
		{
			populateGrdDPP(domain.listDailyPatientProgressHistory(form.getGlobalContext().Core.getCurrentCareContext(), record));
		}
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPocActions(PlanOfCareVo record)
{
	clearGrdPocActions();
	if (record != null)
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), record));
	}
	else
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), null));
	}
}
 
Example 29
Project: openMAXIMS   File: PlanOfCareImpl.java   Source Code and License 5 votes vote down vote up
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
	if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);
	
	return PlanOfCareVoAssembler.create(domainObject);
}
 
Example 30
Project: openMAXIMS   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
	if (patientAssessment == null)
		throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

	if (patientAssessment.isValidated() == false)
		throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

	if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
		throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
	factory.save(doPatientAssessment);

	int countNewCarePlan = 0;
	for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
	{
		PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
		if (voPlanOfCare.getID_PlanOfCare() == null)
			countNewCarePlan++;
		PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
		factory.save(doPlanOfCare);
	}

	PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
	Integer newPlanOfCares = new Integer(countNewCarePlan);
	DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

	return item;
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private PlanOfCareVo getCurrentPlanOfCare(AssessmentQuestionVo voAssessmQuestion)
{
	PlanOfCareVoCollection voPlanOfCareColl = form.getGlobalContext().Nursing.getPlanOfCareCollection();
	for (int i = 0; voPlanOfCareColl != null && i < voPlanOfCareColl.size(); i++)
	{
		if (voPlanOfCareColl.get(i).getAssessmentQuestionIsNotNull() && voPlanOfCareColl.get(i).getAssessmentQuestion().equals(voAssessmQuestion))
			return voPlanOfCareColl.get(i);
	}
	return null;
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean save() 
{
	PlanOfCareVo record = null;

	if (form.getLocalContext().getSelectedRecordIsNotNull())//is Update or View
	{ 
		record = populateDataFromScreen(form.getLocalContext().getSelectedRecord());		
	}
	else
	{
		record = populateDataFromScreen(new PlanOfCareVo());//is New
	}

	String[] uiErrors = getUiErrors();	
	String[] errors = record.validate(uiErrors);
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	try
	{
		record = domain.savePlanOfCare(record);
	}

	catch(StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		updatePlanOfCare(GenForm.ContextMenus.PlanOfCare.UPDATEPOC);
		return false;
	}

	form.getLocalContext().setSelectedRecord(record);
	return true;
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listDailyPatientProgressHistory(Boolean haveDPP, PlanOfCareVo record)
{
	clearGrdDPPList();
	if (haveDPP != null && record != null)
	{
		if (haveDPP.equals(Boolean.TRUE))
		{
			populateGrdDPP(domain.listDailyPatientProgressHistory(form.getGlobalContext().Core.getCurrentCareContext(), record));
		}
	}
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listPocActions(PlanOfCareVo record)
{
	clearGrdPocActions();
	if (record != null)
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), record));
	}
	else
	{
		populateGrdPocActions(domain.listPocActions(form.getGlobalContext().Core.getCurrentCareContext(), null));
	}
}
 
Example 35
Project: openmaxims-linux   File: PlanOfCareImpl.java   Source Code and License 5 votes vote down vote up
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
	if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
	{
		throw new DomainRuntimeException("Invalid record");
	}
	
	DomainFactory factory = getDomainFactory();
	PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);
	
	return PlanOfCareVoAssembler.create(domainObject);
}
 
Example 36
Project: openmaxims-linux   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
	if (patientAssessment == null)
		throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

	if (patientAssessment.isValidated() == false)
		throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

	if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
		throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
	factory.save(doPatientAssessment);

	int countNewCarePlan = 0;
	for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
	{
		PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
		if (voPlanOfCare.getID_PlanOfCare() == null)
			countNewCarePlan++;
		PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
		factory.save(doPlanOfCare);
	}

	PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
	Integer newPlanOfCares = new Integer(countNewCarePlan);
	DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

	return item;
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
protected PlanOfCareVo populateDataFromScreen()
{
	return populateDataFromScreen(new PlanOfCareVo());
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected PlanOfCareVo populateDataFromScreen()
{
	return populateDataFromScreen(new PlanOfCareVo());
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected PlanOfCareVo populateDataFromScreen()
{
	return populateDataFromScreen(new PlanOfCareVo());
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
protected PlanOfCareVo populateDataFromScreen()
{
	return populateDataFromScreen(new PlanOfCareVo());
}