Java Code Examples for ims.core.vo.VitalSignsVo

The following are top voted examples for showing how to use ims.core.vo.VitalSignsVo. 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: RACPCPMHExamImpl.java   Source Code and License 6 votes vote down vote up
public VitalSignsVo getVitalSignsForCareContext(CareContextRefVo refVoCareContext) {
	if (refVoCareContext == null)
		throw new CodingRuntimeException("Cannot get CareContext for null CareContextRefVo");
	
	DomainFactory factory = getDomainFactory();
	StringBuffer hql = new StringBuffer(" from VitalSigns vs where "); 

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	hql.append(" vs.careContext.id = :ccId");
	markers.add("ccId");
	values.add(refVoCareContext.getID_CareContext());
	
	hql.append(" order by vs.vitalsTakenDateTime");

	List listVitalSigns = factory.find(hql.toString(), markers,values);
	if(listVitalSigns != null && listVitalSigns.size() > 0)
	{ 
		VitalSignsVoCollection voColl = VitalSignsVoAssembler.createVitalSignsVoCollectionFromVitalSigns(listVitalSigns);
		if(voColl != null && voColl.size() > 0)
			return voColl.get(0);
	}
	return null;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateObs(VitalSignsVo vitalSigns) 
{
	if (vitalSigns == null)
		return;
	
	if (vitalSigns.getBloodPressureIsNotNull())
	{
		form.intBPDIA().setValue(new Integer(vitalSigns.getBloodPressure().getBPSittingDias().intValue()));
		form.intBPSYS().setValue(new Integer(vitalSigns.getBloodPressure().getBPSittingSys().intValue()));
	}
	
	form.intHeartRate().setValue(vitalSigns.getPulseIsNotNull() ? vitalSigns.getPulse().getPulseRateRadial() : null);
	form.intResp().setValue(vitalSigns.getRespiratoryIsNotNull() ? vitalSigns.getRespiratory().getRespRate() : null);
	form.decTemp().setValue(vitalSigns.getTemperatureIsNotNull() ? vitalSigns.getTemperature().getTemperature() : null);
	
	form.decHeight().setValue(vitalSigns.getMetricsIsNotNull() ? vitalSigns.getMetrics().getHeightValue() : null);
	form.decWeight().setValue(vitalSigns.getMetricsIsNotNull() ? vitalSigns.getMetrics().getWeightValue() : null);
	form.decBMI().setValue(vitalSigns.getMetricsIsNotNull() ? vitalSigns.getMetrics().getBMI() : null);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void open() throws PresentationLogicException 
{
	form.setMode(FormMode.VIEW);
	clearAll();	
	VitalSignsVoCollection voColl = domain.listVitalSigns(form.getGlobalContext().Core.getCurrentCareContext());	
	
	form.recbrHistory().clear();
	for (int i = 0; i < voColl.size(); i++)
	{
		VitalSignsVo vo = voColl.get(i);			
		form.recbrHistory().newRow(voColl.get(i), getAuthoring(vo));
	}
	
	if (form.getLocalContext().getEditedRecordIsNotNull())
		form.recbrHistory().setValue(form.getLocalContext().getEditedRecord());
		
	
	if (form.recbrHistory().getSelectedIndex() >= 0)
		vitallSignsValueChanged();		

	updateControlState();
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();
	
	form.decBloodSugar().setValue(voVitalSign.getBloodSugar().getBloodSugarValue());
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime().getDate());
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime().getTime());
	form.txtHCP().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
	
	if(voVitalSign.getBloodSugar().getType().equals(CBGType.RANDOM))
		form.BloodGlucoseGroup().setValue(GenForm.BloodGlucoseGroupEnumeration.rdoRandom);
	else
		form.BloodGlucoseGroup().setValue(GenForm.BloodGlucoseGroupEnumeration.rdoCBGM);
	
	if(voVitalSign.getBloodSugar().getTimePeriodIsNotNull())
		form.cmbTimePeriod().setValue(voVitalSign.getBloodSugar().getTimePeriod());
	
	if(voVitalSign.getBloodSugar().getPostBloodSugarValueIsNotNull())
		form.decPostValue().setValue(voVitalSign.getBloodSugar().getPostBloodSugarValue());
	
	if(voVitalSign.getBloodSugar().getTimeIntervalIsNotNull())
		form.intTimeInterval().setValue(voVitalSign.getBloodSugar().getTimeInterval());
			
	form.btnUpdate().setEnabled(true);
	showBloodGlucoseControls(voVitalSign.getBloodSugar().getType().equals(CBGType.CBGM));
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhBloodSugarPointClicked(GraphingPoint point) 
{
	if(point.getType() == GraphingPointType.BLOODSUGAR)
	{ 			
		GraphingBloodSugar pointBloodSugar = (GraphingBloodSugar)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointBloodSugar.getTag());
		displayRecord((VitalSignsVo)pointBloodSugar.getTag());
		form.btnUpdate().setEnabled(true);
		//form.btnPrint().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getBloods();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}
	
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhPainPointClicked(ims.framework.utils.graphing.GraphingPoint point)
{
	if(point.getType() == GraphingPointType.CUSTOM_ONE_VALUE)
	{ 			
		GraphingCustomOneValue pointTemp = (GraphingCustomOneValue)point;
		form.getLocalContext().setVitalSign((VitalSignsVo)pointTemp.getTag());
		displayRecord((VitalSignsVo)pointTemp.getTag());
		form.btnUpdate().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voPain = form.getLocalContext().getPains();
		for(int i = 0; i < voPain.size(); i++)
		{
			if(form.getLocalContext().getVitalSign().getID_VitalSigns().intValue() == voPain.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhGCSPointClicked(GraphingPoint point) 
{
	if(point.getType() == GraphingPointType.GLASGOWCOMASCALE)
	{ 			
		GraphingGlasgowComaScale pointGCS = (GraphingGlasgowComaScale)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointGCS.getTag());
		displayRecord((VitalSignsVo)pointGCS.getTag());
		form.btnUpdate().setEnabled(true);
		//form.btnPrint().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getComas();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}			
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhOxygenSatPointClicked(GraphingPoint point) 
{
	if(point.getType() == GraphingPointType.OXYGEN)
	{ 			
		GraphingOxygen pointOxygen = (GraphingOxygen)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointOxygen.getTag());
		displayRecord((VitalSignsVo)pointOxygen.getTag());
		form.btnUpdate().setEnabled(true);
		//form.btnPrint().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getOxygens();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	} 
	
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnUpdateClick() throws PresentationLogicException 
{
	if (form.grdVital().getValue() != null)
	{
		VitalSignsVo voVitalSign = null;
		voVitalSign = domain.getVitalCapacity(form.grdVital().getValue());
		if (voVitalSign != null)
		{
			form.setMode(FormMode.EDIT);
			form.ctnDetails().setCollapsed(false);
			populateVitalCapacityDetails(voVitalSign);
			form.ctnDetails().customControlAuthoringInfo().setIsRequiredPropertyToControls(true);
		}
		
	}
	
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateVitalCapacityDetails(VitalSignsVo voVitalSigns) 
{
	if (voVitalSigns != null)
	{
		form.getLocalContext().setselectedVitalCapacity(voVitalSigns);
		
		if (voVitalSigns.getAuthoringInformationIsNotNull())
			form.ctnDetails().customControlAuthoringInfo().setValue(voVitalSigns.getAuthoringInformation());
		
		if (voVitalSigns.getVitalsTakenDateTime() != null)
		{
			form.ctnDetails().dteTaken().setValue(voVitalSigns.getVitalsTakenDateTime().getDate());
			form.ctnDetails().timTaken().setValue(voVitalSigns.getVitalsTakenDateTime().getTime());
		}
							
		if (voVitalSigns.getLungFunctionTest()!= null)
		{
			form.ctnDetails().intTidalVolume().setValue(voVitalSigns.getLungFunctionTest().getTidalVolume());
			form.ctnDetails().decVitalCapacity().setValue(voVitalSigns.getLungFunctionTest().getVitalCapacity());
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();

	form.btnUpdate().setEnabled(true);
	// form.btnPrint().setEnabled(true);

	form.intPulseRadial().setValue(voVitalSign.getPulse().getPulseRateRadial());
	form.intPulseApex().setValue(voVitalSign.getPulse().getPulseRateApex());
	if(voVitalSign.getPulse().getIsIrregular() == null) //WDEV-2010
		form.chkIrregularPulse().setValue(false);
	else
		form.chkIrregularPulse().setValue(voVitalSign.getPulse().getIsIrregular().booleanValue());
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime().getDate());
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime().getTime());
	if (voVitalSign.getAuthoringInformation()!=null && voVitalSign.getAuthoringInformation().getAuthoringHcp() != null)
	form.txtHCP().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
}
 
Example 12
Project: AvoinApotti   File: VitalSignsBaselineAndAllImpl.java   Source Code and License 6 votes vote down vote up
/**
* Saves a vital sign
*/
public ims.core.vo.VitalSignsVo saveVitalSign(ims.core.vo.VitalSignsVo vitalSign) throws ims.domain.exceptions.StaleObjectException
{
	if (!vitalSign.isValidated())
	{
		throw new DomainRuntimeException("This Vital Sign has not been validated");
	}

	DomainFactory factory = getDomainFactory();
	VitalSigns doVitals = VitalSignsVoAssembler.extractVitalSigns(factory, vitalSign);

	try
	{
		factory.save(doVitals);
		return VitalSignsVoAssembler.create(doVitals);
	}
	catch (DomainException e)
	{
		throw new DomainRuntimeException("Domain Exception Occurred.\r\n" + e.getMessage(), e);
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhMetricsPointClicked(ims.framework.utils.graphing.GraphingPoint point)
{
	if(point.getType() == GraphingPointType.METRICS)
	{ 			
		GraphingMetrics pointMetrics = (GraphingMetrics)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointMetrics.getTag());
		displayRecord((VitalSignsVo)pointMetrics.getTag());
		form.btnUpdate().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getMetrics();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}		
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();

	if(voVitalSign == null)
		return;
	
	form.decHeight().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getHeightValue() : null);
	form.decWeight().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getWeightValue() : null);
	form.decBMI().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getBMI() : null);
	form.decSurArea().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getSurfaceArea() : null);	
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime() != null ? voVitalSign.getVitalsTakenDateTime().getDate() : null);
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime() != null ?  voVitalSign.getVitalsTakenDateTime().getTime() : null);
	
	if(voVitalSign.getAuthoringInformation()!= null && voVitalSign.getAuthoringInformation().getAuthoringHcp()!= null)
		form.txtHcp().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
			
	form.btnUpdate().setEnabled(true);
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void listVitalSigns() throws PresentationLogicException
{
	form.recbrAllRecords().clear();
	form.getLocalContext().setSelectedVitalSignsVo(null);
	VitalSignsVoCollection voColl = domain.listVitalSigns(form.getGlobalContext().Core.getCurrentCareContext());
	
	if (voColl != null)
	{
		for (int i = 0; i < voColl.size(); i++)
			form.recbrAllRecords().newRow(voColl.get(i), (voColl.get(i).getAuthoringInformationIsNotNull() && voColl.get(i).getAuthoringInformation().getAuthoringDateTime() != null ? voColl.get(i).getAuthoringInformation().getAuthoringDateTime().toString() : "") + " - " + (voColl.get(i).getAuthoringInformationIsNotNull() && voColl.get(i).getAuthoringInformation().getAuthoringHcp() != null ? voColl.get(i).getAuthoringInformation().getAuthoringHcp().toString() : ""));
	
		if (form.recbrAllRecords().getValue() == null && form.recbrAllRecords().getValues() != null && voColl.size() > 0)
		{
			form.recbrAllRecords().setValue((VitalSignsVo) form.recbrAllRecords().getValues().get(0));
		}
	}

	form.lyrVSigns().tabSection1().intBPStandingDiastolic().setEnabled(false);
	form.lyrVSigns().tabSection1().intBPStandingSystolic().setEnabled(false);

	selectVitalSign();
}
 
Example 16
Project: AvoinApotti   File: VitalSignsBaselineAndAllImpl.java   Source Code and License 6 votes vote down vote up
public VitalSignsVo saveABGO2Sats(VitalSignsVo voVitalABGO2) throws StaleObjectException
{
	if (!voVitalABGO2.isValidated())
	{
		throw new DomainRuntimeException("This Vital Sign has not been validated");
	}

	DomainFactory factory = getDomainFactory();
	VitalSigns doVitals = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalABGO2);

	try
	{
		factory.save(doVitals);
		return VitalSignsVoAssembler.create(doVitals);
	}
	catch (DomainException e)
	{
		throw new DomainRuntimeException("Domain Exception Occurred.\r\n" + e.getMessage(), e);
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhPeakFlowPointClicked(GraphingPoint point)
{
	if(point.getType() == GraphingPointType.PEAKFLOW)
	{ 			
		GraphingPeakFlow pointPeakFlow = (GraphingPeakFlow)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointPeakFlow.getTag());
		displayRecord((VitalSignsVo)pointPeakFlow.getTag());
		form.btnUpdate().setEnabled(true);
		//form.btnPrint().setEnabled(true);
	}

	//update the Prev/Next buttons
	VitalSignsVoCollection voTemperatures = form.getLocalContext().getPeaks();
	for(int i = 0; i < voTemperatures.size(); i++)
	{
		if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
		{
			form.getLocalContext().setCurrentIndex(new Integer(i));
			updatePrevNextButtons();
			break;
		}
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();
	
	if(voVitalSign == null)
		return;

	form.decHeight().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getHeightValue() : null);
	form.decWeight().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getWeightValue() : null);
	form.decBMI().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getBMI() : null);
	form.decSurArea().setValue(voVitalSign.getMetrics() != null ? voVitalSign.getMetrics().getSurfaceArea() : null);	
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime() != null ? voVitalSign.getVitalsTakenDateTime().getDate() : null);
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime() != null ? voVitalSign.getVitalsTakenDateTime().getTime() : null);
	if(voVitalSign.getAuthoringInformation()!= null && voVitalSign.getAuthoringInformation().getAuthoringHcp()!= null)
		form.txtHcp().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
			
	form.btnUpdate().setEnabled(true);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhBPPointClicked(GraphingPoint point) 
{
	if(point.getType() == GraphingPointType.BLOODPRESSURE)
	{ 			
		GraphingBloodPressure pointBP = (GraphingBloodPressure)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointBP.getTag());
		displayRecord((VitalSignsVo)pointBP.getTag());
		form.btnUpdate().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getBloods();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}
	
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrhTempPointClicked(GraphingPoint point) 
{	
	if(point.getType() == GraphingPointType.TEMPERATURE)
	{ 			
		GraphingTemperature pointTemp = (GraphingTemperature)point;
		form.getLocalContext().setvitalSign((VitalSignsVo)pointTemp.getTag());
		displayRecord((VitalSignsVo)pointTemp.getTag());
		form.btnUpdate().setEnabled(true);
		
		//update the Prev/Next buttons
		VitalSignsVoCollection voTemperatures = form.getLocalContext().getTemperatures();
		for(int i = 0; i < voTemperatures.size(); i++)
		{
			if(form.getLocalContext().getvitalSign().getID_VitalSigns().intValue() == voTemperatures.get(i).getID_VitalSigns().intValue())
			{
				form.getLocalContext().setCurrentIndex(new Integer(i));
				updatePrevNextButtons();
				break;
			}
		}
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void listVitalSigns() throws PresentationLogicException
{
	form.cmbAllRecords().clear();
	form.getLocalContext().setSelectedVitalSignsVo(null);
	VitalSignsVoCollection voColl = domain.listVitalSigns(form.getGlobalContext().Core.getCurrentCareContext());
	if (voColl != null)
	{
		for (int i = 0; i < voColl.size(); i++)
			form.cmbAllRecords().newRow(voColl.get(i), (voColl.get(i).getAuthoringInformationIsNotNull() && voColl.get(i).getAuthoringInformation().getAuthoringDateTime() != null ? voColl.get(i).getAuthoringInformation().getAuthoringDateTime().toString() : "") + " - " + (voColl.get(i).getAuthoringInformationIsNotNull() && voColl.get(i).getAuthoringInformation().getAuthoringHcp() != null ? voColl.get(i).getAuthoringInformation().getAuthoringHcp().toString() : ""));
	}
	// the latest record must be populated into the combo. Dont want blank
	// row
	if (form.cmbAllRecords().getValue() == null && form.cmbAllRecords().getValues() != null && voColl.size() > 0)
	{
		form.cmbAllRecords().setValue((VitalSignsVo) form.cmbAllRecords().getValues().get(0));
	}

	form.intBPStandingDiastolic().setEnabled(false);
	form.intBPStandingSystolic().setEnabled(false);

	onCmbAllRecordsValueChanged();
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean populateVitalSignsVo(VitalSignsVo voVitalSign, RACPPastMedicalHistoryVo voRACPPastMedicalHistory) {
	
	boolean bUpdateVitalSigns = false;
	
	if(voVitalSign.getAuthoringInformation()==null)
		voVitalSign.setAuthoringInformation(getAuthoringInfo());

	if(voVitalSign.getVitalsTakenDateTime()==null)
		voVitalSign.setVitalsTakenDateTime(new DateTime());

	if(voVitalSign.getCareContext()==null)
		voVitalSign.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
	
	if(voVitalSign.getBloodPressure()==null 
			|| (voVitalSign.getBloodPressureIsNotNull() && voVitalSign.getBloodPressure().getBPSittingDias()==null) ){
		voVitalSign.setBloodPressure(voRACPPastMedicalHistory.getVSBP());
		bUpdateVitalSigns = true;
	}
	
	if(voVitalSign.getMetrics()==null 
			|| (voVitalSign.getMetricsIsNotNull() && voVitalSign.getMetrics().getHeightValue()==null) ){
		voVitalSign.setMetrics(voRACPPastMedicalHistory.getHeightWeight());
		bUpdateVitalSigns = true;
	}
	
	if(voVitalSign.getPulse()==null 
			|| (voVitalSign.getPulseIsNotNull() && voVitalSign.getPulse().getPulseRateRadial()==null) ){
		voVitalSign.setPulse(voRACPPastMedicalHistory.getVSPulse());
		bUpdateVitalSigns = true;
	}
	
	return bUpdateVitalSigns;
	
}
 
Example 23
Project: AvoinApotti   File: RACPCPMHExamImpl.java   Source Code and License 5 votes vote down vote up
public VitalSignsVo saveVitalSignsForCareContext(VitalSignsVo voVitalSigns) throws StaleObjectException {
	if (voVitalSigns == null  || !voVitalSigns.isValidated())
		throw new CodingRuntimeException("Vital Signs is null or has not been validated");
	DomainFactory factory=getDomainFactory();
	
	VitalSigns doRACPPastMedicalHistory = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalSigns);
	factory.save(doRACPPastMedicalHistory);
	return VitalSignsVoAssembler.create(doRACPPastMedicalHistory);
}
 
Example 24
Project: AvoinApotti   File: SleepAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public VitalSignsVo getVitalsVo(ClinicalContactShortVo voClinicalContact)
{
	VitalSignsAll impl = (VitalSignsAll)getDomainImpl(VitalSignsImpl.class);
	VitalSignsVo voVS = new VitalSignsVo();
	ClinicalContactShortVo voClinContact = new ClinicalContactShortVo();
	voClinContact.setID_ClinicalContact(voClinicalContact.getID_ClinicalContact());
	voVS.setClinicalContact(voClinContact);
	return impl.getVitalSignsRecord(voVS);
}
 
Example 25
Project: AvoinApotti   File: MNAInputImpl.java   Source Code and License 5 votes vote down vote up
public MnaEnhancedVo saveAll(MnaEnhancedVo mnaEnhancedRecordVo,	CareContextShortVo careContext) throws DomainInterfaceException,StaleObjectException, UniqueKeyViolationException {
	// Ensure the Value Object was validated
	if (!mnaEnhancedRecordVo.isValidated())
		throw new DomainRuntimeException("This MnaEnhanced VO has not been validated");

	VitalSignsVo vs = null;
	if(mnaEnhancedRecordVo.getVsRecord() != null){
		vs = insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
		if(vs!=null)
			mnaEnhancedRecordVo.getMnaRecord().setMetrics(vs.getMetrics());
	}
	
	mnaEnhancedRecordVo.getMnaRecord().validate();
	
	MiniNutritionalAssessment mna = saveRecord(mnaEnhancedRecordVo.getMnaRecord());
	AssessmentHeaderInfo headerInfo = null;
	
	if(mnaEnhancedRecordVo.getVsRecord() != null)
		insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
	if(mnaEnhancedRecordVo.getAedRecord() != null)
	{
		mnaEnhancedRecordVo.getAedRecord().setMiniNutritionalAssessment(mna);
		mnaEnhancedRecordVo.getAedRecord().validate();
		headerInfo = saveEatingAssessmentComponent(mnaEnhancedRecordVo.getAshRecord(), mnaEnhancedRecordVo.getAedRecord(), careContext);
	}
	
	mnaEnhancedRecordVo.setMnaRecord(mna);
	mnaEnhancedRecordVo.setAshRecord(headerInfo);
	
	return mnaEnhancedRecordVo;
	
}
 
Example 26
Project: AvoinApotti   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
	// Ensure the Value Object was validated
	if (!nutritionalRiskRecord.isValidated())
		throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");
		
	DomainFactory factory = getDomainFactory();			
	NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	
	factory.save(domAssessment);
	
	if(vitalSign != null)
		saveVitalSign(vitalSign);
	
	if (assessment != null)
	{
		if(component != null && component instanceof NurAssessmentEatingVo)
		{
			NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
			nutritionalRisk.validate();
			
			((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
			component.validate();
		}

		assessment.validate();

		return saveEatingComponent(assessment, component, null);
	}
	return null;  // It otherwise expects assessment header
}
 
Example 27
Project: AvoinApotti   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public VitalSignsVo saveVitalSign(VitalSignsVo vitalSign) throws ims.domain.exceptions.StaleObjectException
{
	if (!vitalSign.isValidated())
	{
		throw new DomainRuntimeException("This Vital Sign has not been validated");
	}
	
	DomainFactory factory = getDomainFactory();

	VitalSigns doVitals = VitalSignsVoAssembler.extractVitalSigns(factory, vitalSign);
	
	factory.save(doVitals);
	return VitalSignsVoAssembler.create(doVitals);
}
 
Example 28
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();		
	
	if (voVitalSign.getPainIsNotNull())
	{
		form.cmbPain().setValue(voVitalSign.getPain().getPain());	
		setCustomAuthoring(voVitalSign);

		form.btnUpdate().setEnabled(true);			
	}
	else
		form.btnUpdate().setEnabled(false);	
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setCustomAuthoring(VitalSignsVo voVitalSign)
{
	DateTime voDateTime = new DateTime();
	voDateTime.setDateTime(voVitalSign.getVitalsTakenDateTime().getDate(), voVitalSign.getVitalsTakenDateTime().getTime());

	AuthoringInformationVo voAuthoring = new AuthoringInformationVo();
	voAuthoring.setAuthoringDateTime(voDateTime);
	voAuthoring.setAuthoringHcp(voVitalSign.getAuthoringInformation().getAuthoringHcp() != null ? voVitalSign.getAuthoringInformation().getAuthoringHcp() : null);
	form.customAuthoring().setValue(voAuthoring);
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException 
{
	VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

	VSGlasgowComaScale voGcs = new VSGlasgowComaScale();

	voGcs.setEyeOpening(form.cmbEye().getValue());
	voGcs.setMotorResponse(form.cmbMotor().getValue());
	voGcs.setVerbalResponse(form.cmbVerbal().getValue());
	voGcs.setTotalGlasgowComaScale(form.intGCS().getValue());
	
	voVitalSign.setGlasgowComaScale(voGcs);

	String[] arrErrors = voVitalSign.validate();
	if(arrErrors == null)
	{
		try {
			domain.modifyGCS(voVitalSign);
		} catch (StaleObjectException e) {
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
			refresh();
			return;
		}
	}
	else
	{
		engine.showErrors("Validation Errors", arrErrors);
		return;	
	}

	form.setMode(FormMode.VIEW);
	
	listGlasgowComaScale();
	
	form.getLocalContext().setvitalSign(voVitalSign);
	displayRecord(form.getLocalContext().getvitalSign());
	
	dateIntervalStatus();
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();
	form.getLocalContext().setvitalSign(voVitalSign);
	form.cmbEye().setValue(voVitalSign.getGlasgowComaScale().getEyeOpening());
	form.cmbMotor().setValue(voVitalSign.getGlasgowComaScale().getMotorResponse());
	form.cmbVerbal().setValue(voVitalSign.getGlasgowComaScale().getVerbalResponse());
	form.intGCS().setValue(voVitalSign.getGlasgowComaScale().getTotalGlasgowComaScale());
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime().getDate());
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime().getTime());
	form.txtHCP().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
	
	form.btnUpdate().setEnabled(true);
	//form.btnPrint().setEnabled(true);
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException 
{
	VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

	VSOxygenSaturation voOxygen = new VSOxygenSaturation();

	voOxygen.setOxygenSaturationLevel(form.intOSaturation().getValue());
	voOxygen.setFractionRate(form.intFractionRate().getValue());
	voOxygen.setIsOnFiO2(form.chkonFiO2().getValue());
	voVitalSign.setOxygenSaturation(voOxygen);

	String[] arrErrors = voVitalSign.validate(validateUIRules());
	if(arrErrors == null)
	{
		try {
			domain.modifyOxygenSaturation(voVitalSign);
		} catch (StaleObjectException e) {
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
			refresh();
			return;
		}
	}
	else
	{
		engine.showErrors("Validation Errors", arrErrors);
		return;	
	}

	form.setMode(FormMode.VIEW);
	
	listOxygenSats();
	
	form.getLocalContext().setvitalSign(voVitalSign);
	displayRecord(form.getLocalContext().getvitalSign());
	
	dateIntervalStatus();		
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();
	
	form.intOSaturation().setValue((voVitalSign != null && voVitalSign.getOxygenSaturationIsNotNull() ) ? voVitalSign.getOxygenSaturation().getOxygenSaturationLevel():null);
	form.intFractionRate().setValue((voVitalSign != null && voVitalSign.getOxygenSaturationIsNotNull()) ? voVitalSign.getOxygenSaturation().getFractionRate():null);
	if(voVitalSign != null && voVitalSign.getOxygenSaturationIsNotNull() && voVitalSign.getOxygenSaturation().getIsOnFiO2IsNotNull())
		form.chkonFiO2().setValue(voVitalSign.getOxygenSaturation().getIsOnFiO2());

	form.dteTaken().setValue((voVitalSign != null && voVitalSign.getVitalsTakenDateTimeIsNotNull() ) ? voVitalSign.getVitalsTakenDateTime().getDate():null);
	form.timTaken().setValue((voVitalSign != null && voVitalSign.getVitalsTakenDateTimeIsNotNull())?voVitalSign.getVitalsTakenDateTime().getTime():null);
	form.txtHCP().setValue((voVitalSign.getAuthoringInformationIsNotNull() && voVitalSign.getAuthoringInformation().getAuthoringHcpIsNotNull()) ? voVitalSign.getAuthoringInformation().getAuthoringHcp().toString():null);
	
	form.btnUpdate().setEnabled(true);
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * @param voCollVitalCapacity
 */
private void populateVitalCapacityGrid(VitalSignsVoCollection voCollVitalCapacity) 
{
	if (voCollVitalCapacity != null)
	{
		GenForm.grdVitalRow row = null;
			
		//inactive record handling
		for(int i=0;i<voCollVitalCapacity.size();i++)
		{
			VitalSignsVo vitalSign  = voCollVitalCapacity.get(i);
			
			if (vitalSign != null && vitalSign.getLungFunctionTest()!= null)
			{
				row = form.grdVital().getRows().newRow();
				row.setValue(vitalSign);
				if (vitalSign.getLungFunctionTest().getTidalVolume() != null)
					row.setColTidalVolume(vitalSign.getLungFunctionTest().getTidalVolume());
				if (vitalSign.getLungFunctionTest().getVitalCapacity() != null)
					row.setColVitalCapacity(vitalSign.getLungFunctionTest().getVitalCapacity());
				if (vitalSign.getAuthoringInformationIsNotNull())	
					if (vitalSign.getAuthoringInformation().getAuthoringHcpIsNotNull())
						row.setColHCP(vitalSign.getAuthoringInformation().getAuthoringHcp().toString());
				
				if (vitalSign.getVitalsTakenDateTime() != null)
					row.setColDate(vitalSign.getVitalsTakenDateTime().toString());		
				
			}
		}
	}
	
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException 
{
	if(form.cmbReactionLeft().getValue() == null || form.cmbReactionRight().getValue()== null)
	{
		engine.showMessage("Please enter values for pupil reactions for both eyes");
		return;
	}
	VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

	VSPupils voPupil = new VSPupils();

	voPupil.setPupilLeftReaction(form.cmbReactionLeft().getValue());
	voPupil.setPupilRightReaction(form.cmbReactionRight().getValue());
	voPupil.setPupilLeftSize(form.intSizeLeft().getValue());
	voPupil.setPupilRightSize(form.intSizeRight().getValue());

	voVitalSign.setPupils(voPupil);

	String[] arrErrors = voVitalSign.validate();
	if(arrErrors == null)
	{
		try {
			domain.modifyPupils(voVitalSign);
		} catch (StaleObjectException e) {
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
			refresh();
			return;
		}
	}
	else
	{
		engine.showErrors("Validation Errors", arrErrors);
		return;	
	}

	form.getGlobalContext().Core.setVitalSign(voVitalSign);
	form.setMode(FormMode.VIEW);
	listPupils();
	dateIntervalStatus();
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayRecord(VitalSignsVo voVitalSign)
{
	clearFields();
	
	form.btnUpdate().setEnabled(true);
	//form.btnPrint().setEnabled(true);
		
	form.intSizeLeft().setValue(voVitalSign.getPupils().getPupilLeftSize());
	form.intSizeRight().setValue(voVitalSign.getPupils().getPupilRightSize());
	form.cmbReactionLeft().setValue(voVitalSign.getPupils().getPupilLeftReaction());
	form.cmbReactionRight().setValue(voVitalSign.getPupils().getPupilRightReaction());
	form.dteTaken().setValue(voVitalSign.getVitalsTakenDateTime().getDate());
	form.timTaken().setValue(voVitalSign.getVitalsTakenDateTime().getTime());
	form.txtHCP().setValue(voVitalSign.getAuthoringInformation().getAuthoringHcp().toString());
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException
{
	VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

	VSPulse voPulse = new VSPulse();

	voPulse.setPulseRateRadial(form.intPulseRadial().getValue());
	voPulse.setPulseRateApex(form.intPulseApex().getValue());
	voPulse.setIsIrregular(new Boolean(form.chkIrregularPulse().getValue()));

	voVitalSign.setPulse(voPulse);

	String[] arrErrors = voVitalSign.validate();

	if (arrErrors == null)
	{
		try
		{
			domain.modifyPulse(voVitalSign);
		}
		catch (StaleObjectException e)
		{
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
			refresh();
			return;
		}
	}
	else
	{
		engine.showErrors("Validation Errors", arrErrors);
		return;
	}

	form.getGlobalContext().Core.setVitalSign(voVitalSign);
	form.setMode(FormMode.VIEW);
	listPulse();
	dateIntervalStatus();
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateGrid(VitalSignsVoCollection coll)
{
	form.grdBloodGas().getRows().clear();
	GenForm.grdBloodGasRow row;

	//inactive record handling
	for(int i=0;i<coll.size();i++)
	{

		
		VitalSignsVo aBGO2Sats  = coll.get(i);
			
		if (aBGO2Sats != null && aBGO2Sats.getArterialBloodGasIsNotNull())
		{
			row = form.grdBloodGas().getRows().newRow();
			row.setValue(aBGO2Sats);
			row.setColBExcess(aBGO2Sats.getArterialBloodGas().getBaseExcess());
			row.setColDateTime(aBGO2Sats.getVitalsTakenDateTime().getDate().toString() + " "+ aBGO2Sats.getVitalsTakenDateTime().getTime().toString());
			row.setColO2(aBGO2Sats.getOxygenSaturation().getOxygenSaturationLevel());
			row.setColPaCO2(aBGO2Sats.getArterialBloodGas().getPaCO2());
			row.setColPaO2(aBGO2Sats.getArterialBloodGas().getPaO2());
			row.setColPh(aBGO2Sats.getArterialBloodGas().getPH());
			row.setColSBC(aBGO2Sats.getArterialBloodGas().getSBC());
			if (aBGO2Sats.getArterialBloodGas().getVentilationMode() != null)
				row.setColMode(aBGO2Sats.getArterialBloodGas().getVentilationMode().getText());
		}
	}
	
	//WDEV-10802 for RIE
	CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext();
	domain.listArterialBSVo(careContext);	
}
 
Example 39
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateEntryControls(VitalSignsVo vo)
{
	form.cmbVentilation().setValue(vo.getArterialBloodGas().getVentilationMode());
	form.decBExcess().setValue(vo.getArterialBloodGas().getBaseExcess());
	form.decPaCO2().setValue(vo.getArterialBloodGas().getPaCO2());
	form.decPaO2().setValue(vo.getArterialBloodGas().getPaO2());
	form.decPh().setValue(vo.getArterialBloodGas().getPH());
	form.decSBC().setValue(vo.getArterialBloodGas().getSBC());
	form.dtimTaken().setValue(vo.getVitalsTakenDateTime());
	form.intSats().setValue(vo.getOxygenSaturation().getOxygenSaturationLevel());
	if(vo.getAuthoringInformationIsNotNull())
		form.customControlAuthoringInfo().setValue(vo.getAuthoringInformation());
}
 
Example 40
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException 
{
	VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

	VSRespirations voResp = new VSRespirations();

	voResp.setRespRate(form.intResRate().getValue());

	voVitalSign.setRespiratory(voResp);
	
	String[] arrErrors = voVitalSign.validate();
	if(arrErrors == null)
	{
		try {
			domain.modifyRespiration(voVitalSign);
		} catch (StaleObjectException e) {
			engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
			refresh();
			return;
		}
	}
	else
	{
		engine.showErrors("Validation Errors", arrErrors);
		return;	
	}

	form.setMode(FormMode.VIEW);
	
	listRespirations();
	//form.btnUpdate().setEnabled(false);
	
	form.getLocalContext().setvitalSign(voVitalSign);
	displayRecord(form.getLocalContext().getvitalSign());
	
	dateIntervalStatus();
}