当前位置: 首页>>代码示例>>Java>>正文


Java PatientGoalVo类代码示例

本文整理汇总了Java中ims.clinical.vo.PatientGoalVo的典型用法代码示例。如果您正苦于以下问题:Java PatientGoalVo类的具体用法?Java PatientGoalVo怎么用?Java PatientGoalVo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PatientGoalVo类属于ims.clinical.vo包,在下文中一共展示了PatientGoalVo类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onGrdTargetSelectionChanged

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * On Grid Selection Changed event handler
 */
protected void onGrdTargetSelectionChanged() throws PresentationLogicException
{
	// Get the latest information from domain
	if (form.grdTarget().getValue() instanceof PatientGoalRefVo)
	{
		form.getLocalContext().setSelectedRowValue(domain.getPatientGoal((PatientGoalRefVo) form.grdTarget().getValue()));
		form.getLocalContext().setSelectedPatientGoalVo((PatientGoalVo) form.getLocalContext().getSelectedRowValue());
		populateInstanceControls((PatientGoalVo) form.getLocalContext().getSelectedRowValue(), null);
	}
	else if (form.grdTarget().getValue() instanceof PatientGoalTargetRefVo)
	{
		if (!(form.grdTarget().getSelectedRow().getParentRow().getValue() instanceof PatientGoalRefVo))
			throw new CodingRuntimeException("Major logical error - A PatientGoalTarget must be child of a PatientGoal");

		form.getLocalContext().setSelectedRowValue(domain.getPatientGoalTarget((PatientGoalTargetRefVo) form.grdTarget().getValue()));
		populateInstanceControls(domain.getPatientGoal((PatientGoalRefVo) form.grdTarget().getSelectedRow().getParentRow().getValue()), (PatientGoalTargetVo) form.getLocalContext().getSelectedRowValue());
	}

	// Update controls state
	updateControlsState();
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:25,代码来源:Logic.java

示例2: populateGrid

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * 
 * @param patientGoalsCollection
 */
private void populateGrid(PatientGoalVoCollection patientGoalsCollection)
{
	// Clear grid
	form.grdTarget().getRows().clear();

	// If the PatientGoal collection is null terminate function
	if (patientGoalsCollection == null)
		return;

	// Add each PatientGoal to the grid
	for (int i = 0; i < patientGoalsCollection.size(); i++)
	{
		PatientGoalVo patientGoal = patientGoalsCollection.get(i);

		// Skip null records
		if (patientGoal == null)
			continue;

		setPatientGoalRow(form.grdTarget().getRows().newRow(), patientGoal);
	}
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:26,代码来源:Logic.java

示例3: savePatientGoal

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to save a PatientGoal to database
 */
public PatientGoalVo savePatientGoal(PatientGoalVo patientGoal) throws StaleObjectException, UniqueKeyViolationException
{
	// Check if PatientGoalVo was validated	
	if (patientGoal == null || !patientGoal.isValidated())
	{
		throw new DomainRuntimeException("Logical Error - This PatientGoalVo has not been validated");
	}

	// Extract a domain object from PatientGoalVo
	DomainFactory factory = getDomainFactory();
	PatientGoal domPatientGoalVo = PatientGoalVoAssembler.extractPatientGoal(factory, patientGoal);

	// Save to database
	factory.save(domPatientGoalVo);

	// Return saved PatientGoalVo (with ID from database)
	return PatientGoalVoAssembler.create(domPatientGoalVo);
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:22,代码来源:GoalPlanningImpl.java

示例4: updateInstance

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to edit a PatientGoal or a PatientGoalTarget instance
 */
public void updateInstance()
{
	if (form.getLocalContext().getSelectedRowValue() instanceof PatientGoalRefVo)
	{
		// Get PatientGoal object data from domain
		form.getLocalContext().setSelectedRowValue(domain.getPatientGoal((PatientGoalRefVo) form.getLocalContext().getSelectedRowValue()));

		// Populate instance controls with fresh data
		populateInstanceControls((PatientGoalVo) form.getLocalContext().getSelectedRowValue(), null);

	}
	else if (form.getLocalContext().getSelectedRowValue() instanceof PatientGoalTargetRefVo)
	{
		// Check for a valid value in parent row
		if (form.grdTarget().getSelectedRow() == null || form.grdTarget().getSelectedRow().getParentRow() == null || !(form.grdTarget().getSelectedRow().getParentRow().getValue() instanceof PatientGoalRefVo))
			throw new CodingRuntimeException("Major Logical Error - PatientGoalTarget rows must have a PatientGoal target");

		// Get parent PatientGoal object data from domain
		PatientGoalVo patientGoal = domain.getPatientGoal((PatientGoalRefVo) form.grdTarget().getSelectedRow().getParentRow().getValue());

		// Get PatientGoalTarget object data from domain
		form.getLocalContext().setSelectedRowValue(domain.getPatientGoalTarget((PatientGoalTargetRefVo) form.getLocalContext().getSelectedRowValue()));

		// Populate instance controls with fresh data
		populateInstanceControls(patientGoal, (PatientGoalTargetVo) form.getLocalContext().getSelectedRowValue());
	}

	// Set form in EDIT mode
	form.setMode(FormMode.EDIT);
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:34,代码来源:Logic.java

示例5: populateInstanceControls

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to populate the Instance controls It has two parameters
 * 
 * @param patientGoal -
 *            Represents PatientGoal; this parameter should never be null
 *            (pass it even when a PatientGoalTarget is selected)
 * @param patientGoalTarget -
 *            Represents PatientGoalTarget; this parameter should be null
 *            when a PatientGoal row is selected in grid
 */
private void populateInstanceControls(PatientGoalVo patientGoal, PatientGoalTargetVo patientGoalTarget)
{
	// Clear instance controls
	clearInstanceControls();

	// If patient goal is not null populate contents
	// (Should never occur)
	if (patientGoal != null)
	{
		form.ctnGoals().lyrGoals().Goal().cmbAreaOfNeed().setValue(patientGoal.getAreaOfNeed());
		form.ctnGoals().lyrGoals().Goal().cmbGoalType().setValue(patientGoal.getGoalType());
		form.ctnGoals().lyrGoals().Goal().txtGoal().setValue(patientGoal.getGoalText());
		form.ctnGoals().lyrGoals().Goal().dtimCreated().setValue(patientGoal.getCreatedDateTime());

		// For authoring HCP check if there is one present first
		if (patientGoal.getAuthoringHCPIsNotNull())
		{
			form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().newRow(patientGoal.getAuthoringHCP(), patientGoal.getAuthoringHCP().toString());
			form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().setValue(patientGoal.getAuthoringHCP());
		}

		form.ctnGoals().lyrGoals().Goal().dteAchieved().setValue(patientGoal.getDateAchieved());
		
		form.getLocalContext().setSelectedPatientGoalVo(patientGoal);
	}

	// If patient goal target is not null populate contents
	if (patientGoalTarget != null)
	{
		form.ctnGoals().lyrGoals().Target().txtTarget().setValue(patientGoalTarget.getTarget());
		form.ctnGoals().lyrGoals().Target().cmbLOA().setValue(patientGoalTarget.getLOA());
		form.ctnGoals().lyrGoals().Target().txtReasonNonA().setValue(patientGoalTarget.getReasonForNonA());
		form.ctnGoals().lyrGoals().Target().dteTargetDate().setValue(patientGoalTarget.getTargetDate());
		form.ctnGoals().lyrGoals().Target().dteAchievedDate().setValue(patientGoalTarget.getDateAchieved());
	}
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:47,代码来源:Logic.java

示例6: getPatientGoal

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to get a PatientGoal from database
 */
public PatientGoalVo getPatientGoal(PatientGoalRefVo patientGoalRef)
{
	// If no PatientGoalRefVo is provided or no ID is present return null
	if (patientGoalRef == null || !patientGoalRef.getID_PatientGoalIsNotNull())
		return null;
	
	// Return PatientGoal based on ID
	return PatientGoalVoAssembler.create((PatientGoal) getDomainFactory().getDomainObject(PatientGoal.class, patientGoalRef.getID_PatientGoal()));
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:13,代码来源:GoalPlanningImpl.java

示例7: addNewTargetToSelectedGoal

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to temporarily add a target to a goal
 */
private boolean addNewTargetToSelectedGoal()
{
	// Not only the local context containing the selected object needs to be
	// a PatientGoal,
	// but also in the grid on the form a row must be selected, and that row
	// value must be of type PatientGoal

	// Check for a selected PatientGoal
	if (!(form.getLocalContext().getSelectedRowValue() instanceof PatientGoalVo))
		throw new CodingRuntimeException("Major Logical Error - Can only add a PatientGoalTarget to a PatientGoal");

	// Check for a selected row
	if (form.grdTarget().getSelectedRow() != null && !(form.grdTarget().getSelectedRow().getValue() instanceof PatientGoalRefVo))
		throw new CodingRuntimeException("Major Logical Error - Can only add a PatientGoalTarget to a selected Patient Goal");

	// Get a PatientGoalTargetVo from screen data
	PatientGoalTargetVo patientGoalTarget = populatePatientGoalTargetFromScreen();

	// Validate PatientGoalTarget VO obtained from screen data
	String[] errors = patientGoalTarget.validate();

	if (errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}

	// Add a child row to currently selected row with PatientGoalTarget
	// value
	grdTargetRow newRow = form.grdTarget().getSelectedRow().getRows().newRow();
	setPatientGoalTargetRow(newRow, patientGoalTarget);

	// Set background color for new row
	newRow.setBackColor(Color.Bisque);

	// Get PatientGoalVo from local context
	PatientGoalVo patientGoal = (PatientGoalVo) form.getLocalContext().getSelectedRowValue();

	// Check PatientGoal target collection - create a new collection if need
	// to
	if (!patientGoal.getTargetIsNotNull())
	{
		patientGoal.setTarget(new PatientGoalTargetVoCollection());
	}

	// Add target to selected PatientGoal
	patientGoal.getTarget().add(patientGoalTarget);

	return true;
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:54,代码来源:Logic.java

示例8: setPatientGoalRow

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to set up a GridRow with a PatientGoal value
 * 
 * @param row -
 *            the provided row to set up with PatientGoal; the row can not
 *            be null
 * @param patientGoal -
 *            PatientGoal to be set up on row
 */
private void setPatientGoalRow(grdTargetRow row, PatientGoalVo patientGoal)
{
	// Do a check on parameters
	if (patientGoal == null)
		return;

	// If a null row is provided, then it's a major logical error
	if (row == null)
		throw new CodingRuntimeException("Major Logical Error - Null row provided to set up a PatientGoal");

	// Build the display text to display for the PatientGoal
	StringBuffer displayText = new StringBuffer();

	if (patientGoal.getAreaOfNeedIsNotNull())
		displayText.append(patientGoal.getAreaOfNeed().getText());

	if (patientGoal.getGoalTypeIsNotNull())
		displayText.append(", ").append(patientGoal.getGoalType().getText());

	if (patientGoal.getCreatedDateTimeIsNotNull())
		displayText.append(", ").append(patientGoal.getCreatedDateTime());

	if (patientGoal.getGoalTextIsNotNull())
		displayText.append(", ").append(patientGoal.getGoalText());

	row.setcolTarget(displayText.toString());

	// Set up the tool tip for the row
	if (patientGoal.getGoalTextIsNotNull())
		row.setTooltip("<b>Goal:</b> " + patientGoal.getGoalText());

	// Set the row value
	row.setValue(patientGoal);

	// Set up PatientGoal row background color
	row.setBackColor(Color.LightYellow);

	// Set up PatientGoal targets (or color the row in LightYellow if it has
	// no targets)
	if (patientGoal.getTargetIsNotNull())
	{
		for (int i = 0; i < patientGoal.getTarget().size(); i++)
		{
			PatientGoalTargetVo patientGoalTarget = patientGoal.getTarget().get(i);

			// Skip null entries in collection
			if (patientGoalTarget == null)
				continue;

			setPatientGoalTargetRow(row.getRows().newRow(), patientGoalTarget);
		}

		// Expand the row
		row.setExpanded(true);
	}
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:66,代码来源:Logic.java

示例9: populatePatientGoalFromScreen

import ims.clinical.vo.PatientGoalVo; //导入依赖的package包/类
/**
 * Function used to create a new PatientGoal from screen data; it calls
 * populatePatientGoalFromScreen(null)
 * 
 * @return a new PatientGoal object populated with data from screen and the
 *         current CareContext
 */
private PatientGoalVo populatePatientGoalFromScreen()
{
	return populatePatientGoalFromScreen(null);
}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:12,代码来源:Logic.java


注:本文中的ims.clinical.vo.PatientGoalVo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。